-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
281 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: db_backup | ||
|
||
on: | ||
schedule: | ||
- cron: '0 3 * * *' | ||
|
||
jobs: | ||
cron: | ||
runs-on: [self-hosted, Linux, prod] | ||
|
||
steps: | ||
- name: Execute Backup Script | ||
run: ~/backend/db/backup_cron.sh |
Submodule secrets
updated
from bafff7 to 45b345
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/backend/itracker/crawl/macbook/service/dto/MacbookFilterCondition.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ackend/itracker/config/ShedulingConfig.kt → ...racker/schedule/config/ShedulingConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ler/converter/OauthServerTypeConverter.kt → ...mon/converter/OauthServerTypeConverter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ler/converter/ProductCategoryConverter.kt → ...mon/converter/ProductCategoryConverter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../tracker/controller/request/PageParams.kt → ...cker/tracker/common/request/PageParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/main/kotlin/backend/itracker/tracker/config/ArgumentResolverConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package backend.itracker.tracker.config | ||
|
||
import backend.itracker.tracker.resolver.OauthArgumentResolver | ||
import org.springframework.context.annotation.Configuration | ||
import org.springframework.web.method.support.HandlerMethodArgumentResolver | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer | ||
|
||
@Configuration | ||
class ArgumentResolverConfig( | ||
private val oauthArgumentResolver: OauthArgumentResolver | ||
) : WebMvcConfigurer { | ||
|
||
override fun addArgumentResolvers(resolvers: MutableList<HandlerMethodArgumentResolver>) { | ||
resolvers.add(oauthArgumentResolver) | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...backend/itracker/config/QueryDslConfig.kt → ...itracker/tracker/config/QueryDslConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/kotlin/backend/itracker/tracker/config/WebMvcConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
src/main/kotlin/backend/itracker/tracker/controller/response/MacbookResponse.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...r/controller/CoupangPartnersController.kt → ...g/controller/CoupangPartnersController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...racker/service/request/DeepLinkRequest.kt → ...racker/coupang/request/DeepLinkRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rvice/response/CoupangDeepLinkResponse.kt → ...upang/response/CoupangDeepLinkResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
...service/service/CoupangPartnersService.kt → ...coupang/service/CoupangPartnersService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/kotlin/backend/itracker/tracker/member/controller/MemberController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package backend.itracker.tracker.member.controller | ||
|
||
import backend.itracker.tracker.common.response.SingleData | ||
import backend.itracker.tracker.member.controller.response.MyInfoResponse | ||
import backend.itracker.tracker.oauth.Member | ||
import backend.itracker.tracker.resolver.LoginMember | ||
import org.springframework.http.ResponseEntity | ||
import org.springframework.web.bind.annotation.GetMapping | ||
import org.springframework.web.bind.annotation.RestController | ||
|
||
@RestController | ||
class MemberController { | ||
|
||
@GetMapping("/api/v1/me") | ||
fun getMyInfo(@LoginMember member: Member): ResponseEntity<SingleData<MyInfoResponse>> { | ||
return ResponseEntity.ok(SingleData(MyInfoResponse.from(member))) | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/kotlin/backend/itracker/tracker/member/controller/response/MyInfoResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package backend.itracker.tracker.member.controller.response | ||
|
||
import backend.itracker.tracker.oauth.Member | ||
|
||
data class MyInfoResponse( | ||
val id: Long, | ||
val nickname: String, | ||
val image: String, | ||
) { | ||
|
||
companion object { | ||
fun from(member: Member): MyInfoResponse { | ||
return MyInfoResponse( | ||
id = member.id, | ||
nickname = member.nickname, | ||
image = member.profileImage | ||
) | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/main/kotlin/backend/itracker/tracker/member/service/MemberService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package backend.itracker.tracker.member.service | ||
|
||
import backend.itracker.tracker.oauth.Member | ||
import backend.itracker.tracker.oauth.OauthId | ||
import backend.itracker.tracker.oauth.repository.MemberRepository | ||
import backend.itracker.tracker.oauth.repository.getByOauthId | ||
import org.springframework.stereotype.Service | ||
import org.springframework.transaction.annotation.Transactional | ||
import java.util.* | ||
|
||
@Transactional | ||
@Service | ||
class MemberService( | ||
private val memberRepository: MemberRepository | ||
) { | ||
|
||
fun save(member: Member): Member { | ||
return memberRepository.save(member) | ||
} | ||
|
||
fun updateProfile(oauthId: OauthId, target: Member) { | ||
val findMember = memberRepository.getByOauthId(oauthId) | ||
findMember.updateProfile(target) | ||
} | ||
|
||
@Transactional(readOnly = true) | ||
fun findByOauthId(oauthId: OauthId): Optional<Member> { | ||
return memberRepository.findByOauthId(oauthId) | ||
} | ||
|
||
@Transactional(readOnly = true) | ||
fun getByOauthId(oauthId: OauthId): Member { | ||
return memberRepository.getByOauthId(oauthId) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ker/tracker/controller/OauthController.kt → ...acker/oauth/controller/OauthController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.