Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api: ๐Ÿ› ์นดํ…Œ๊ณ ๋ฆฌ ๋ณ„ ์†Œ๋น„ ๋‚ด์—ญ ๋ฆฌ์ŠคํŠธ ์กฐํšŒ ์ •๋ ฌ ์กฐ๊ฑด ์ˆ˜์ • #157

Merged
merged 18 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
e2cfe82
test: provider, oauth_id candidate test
psychology50 Aug 20, 2024
17fef68
feat: already_used_oauth ์—๋Ÿฌ ์ฝ”๋“œ ์ถ”๊ฐ€
psychology50 Aug 20, 2024
763a0bb
feat: oauth_id, provider ์กฐ๊ฑด์œผ๋กœ oauth entity ์กฐํšŒ ๋ฉ”์„œ๋“œ ์ถ”๊ฐ€
psychology50 Aug 20, 2024
e031767
fix: oauth ๋ฐ์ดํ„ฐ ๋ณต๊ตฌ ์‹œ, user ํŒŒ๋ผ๋ฏธํ„ฐ ์ถ”๊ฐ€
psychology50 Aug 20, 2024
a6b79ad
rename: test display name์„ ์ง๊ด€์ ์œผ๋กœ ์ˆ˜์ •
psychology50 Aug 20, 2024
7224464
fix: ๋‹ค๋ฅธ ์‚ฌ์šฉ์ž๊ฐ€ ์ด๋ฏธ ์‚ฌ์šฉ ์ค‘์ธ ๊ฒฝ์šฐ ์˜ˆ์™ธ ์ฒ˜๋ฆฌ
psychology50 Aug 20, 2024
69c82ba
test: oauth user_id ์—…๋ฐ์ดํŠธ ํ…Œ์ŠคํŠธ ์กฐ๊ฑด ์ถ”๊ฐ€
psychology50 Aug 20, 2024
3a7a10e
fix: oauth to_string์—์„œ user ์ œ๊ฑฐ
psychology50 Aug 20, 2024
168108a
test: tx ์ œ๊ฑฐ
psychology50 Aug 20, 2024
b8a1b66
test: oauth ์‚ญ์ œ ์ด๋ ฅ ๋ณต๊ตฌ ๋กœ์ง ์ œ๊ฑฐ ํ…Œ์ŠคํŠธ
psychology50 Aug 20, 2024
3734273
fix: oauth ๋ณต์ˆ˜ ๊ฐœ ๋ฐ์ดํ„ฐ๊ฐ€ ์กฐํšŒ๋  ์ˆ˜ ์žˆ๋Š” ๊ฒฝ์šฐ์˜ ์ˆ˜ ์ œ๊ฑฐ
psychology50 Aug 20, 2024
06d545e
fix: oauth entity reverse_delete ๋ฉ”์„œ๋“œ ์ œ๊ฑฐ
psychology50 Aug 20, 2024
6c9e614
fix: user_sync_dto ๋‚ด๋ถ€ sync_oauth dto ์ œ๊ฑฐ
psychology50 Aug 20, 2024
ee80fbb
docs: swagger ์—๋Ÿฌ ๋ฌธ์„œ ๊ฐฑ์‹ 
psychology50 Aug 20, 2024
bcdb444
fix: oauth service ๋ถˆํ•„์š” ๋ฉ”์„œ๋“œ ๋ฐ ์ฃผ์„ ์ œ๊ฑฐ
psychology50 Aug 20, 2024
5494120
fix: ์ •๋ ฌ ์กฐ๊ฑด spend_at ๋‚ด๋ฆผ์ฐจ์ˆœ, id ์˜ค๋ฆ„์ฐจ์ˆœ์œผ๋กœ ์ˆ˜์ •
psychology50 Aug 22, 2024
af10a0d
docs: swagger error ์ปค์Šคํ…€ ์–ด๋…ธํ…Œ์ด์…˜์œผ๋กœ ์ง€์ •
psychology50 Aug 22, 2024
713509d
Merge branch 'dev' into fix/PW-514-exists-account-oauth-link
psychology50 Aug 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
import io.swagger.v3.oas.annotations.tags.Tag;
import kr.co.pennyway.api.apis.ledger.dto.SpendingCategoryDto;
import kr.co.pennyway.api.apis.ledger.dto.SpendingSearchRes;
import kr.co.pennyway.api.common.annotation.ApiExceptionExplanation;
import kr.co.pennyway.api.common.annotation.ApiResponseExplanations;
import kr.co.pennyway.api.common.query.SpendingCategoryType;
import kr.co.pennyway.api.common.security.authentication.SecurityUserDetails;
import kr.co.pennyway.domain.domains.spending.exception.SpendingErrorCode;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.web.PageableDefault;
Expand Down Expand Up @@ -93,20 +96,14 @@ ResponseEntity<?> getSpendingTotalCountByCategory(
}),
@Parameter(name = "size", description = "ํŽ˜์ด์ง€ ์‚ฌ์ด์ฆˆ (default: 30)", example = "30", in = ParameterIn.QUERY),
@Parameter(name = "page", description = "ํŽ˜์ด์ง€ ๋ฒˆํ˜ธ (default: 0)", example = "0", in = ParameterIn.QUERY),
@Parameter(name = "sort", description = "์ •๋ ฌ ๊ธฐ์ค€ (default: sending.spendAt)", example = "spending.spendAt", in = ParameterIn.QUERY),
@Parameter(name = "direction", description = "์ •๋ ฌ ๋ฐฉ์‹ (default: DESC)", example = "DESC", in = ParameterIn.QUERY),
@Parameter(name = "sort", description = "์ •๋ ฌ ๊ธฐ์ค€ (default: ์†Œ๋น„๋‚ด์—ญ ๋‚ด๋ฆผ์ฐจ์ˆœ, ์‹๋ณ„๊ฐ’ ์˜ค๋ฆ„์ฐจ์ˆœ)", example = "spending.spendAt,DESC&sort=spending.id,ASC", in = ParameterIn.QUERY, allowReserved = true),
@Parameter(name = "pageable", hidden = true)
})
@ApiResponses({
@ApiResponse(responseCode = "200", description = "์ง€์ถœ ๋‚ด์—ญ ์กฐํšŒ ์„ฑ๊ณต", content = @Content(mediaType = "application/json", schemaProperties = @SchemaProperty(name = "spendings", schema = @Schema(implementation = SpendingSearchRes.MonthSlice.class)))),
@ApiResponse(responseCode = "400", description = "type๊ณผ categoryId ๋ฏธ์Šค ๋งค์น˜", content = @Content(examples =
@ExampleObject(name = "type๊ณผ categoryId๊ฐ€ ์œ ํšจํ•˜์ง€ ์•Š์€ ์กฐํ•ฉ", description = "type์ด default๋ฉด์„œ, categoryId๊ฐ€ CUSTOM(0) ํ˜น์€ OTHER(12)์ผ ์ˆ˜๋Š” ์—†๋‹ค.", value = """
{
"code": "4005",
"message": "type์˜ ์ •๋ณด์™€ categoryId์˜ ์ •๋ณด๊ฐ€ ์กด์žฌํ•  ์ˆ˜ ์—†๋Š” ์กฐํ•ฉ์ž…๋‹ˆ๋‹ค."
}
"""
)))
})
@ApiResponseExplanations(errors = {
@ApiExceptionExplanation(value = SpendingErrorCode.class, constant = "INVALID_TYPE_WITH_CATEGORY_ID", name = "type๊ณผ categoryId ๋ฏธ์Šค ๋งค์น˜", description = "type์ด default๋ฉด์„œ, categoryId๊ฐ€ CUSTOM(0) ํ˜น์€ OTHER(12)์ผ ์ˆ˜๋Š” ์—†๋‹ค.")
})
ResponseEntity<?> getSpendingsByCategory(
@PathVariable(value = "categoryId") Long categoryId,
psychology50 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ public ResponseEntity<?> getSpendingTotalCountByCategory(
public ResponseEntity<?> getSpendingsByCategory(
@PathVariable(value = "categoryId") Long categoryId,
@RequestParam(value = "type") SpendingCategoryType type,
@PageableDefault(size = 30, page = 0) @SortDefault(sort = "spending.spendAt", direction = Sort.Direction.DESC) Pageable pageable,
@PageableDefault(size = 30, page = 0) @SortDefault.SortDefaults({
@SortDefault(sort = "spending.spendAt", direction = Sort.Direction.DESC),
@SortDefault(sort = "spending.id", direction = Sort.Direction.ASC)
}) Pageable pageable,
@AuthenticationPrincipal SecurityUserDetails user
) {
if (type.equals(SpendingCategoryType.DEFAULT) && (categoryId.equals(0L) || categoryId.equals(12L))) {
psychology50 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading