-
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.
Merge pull request #70 from Gongjakso/feat/apply
fix : endDate->finishDate로 수정 및 오타 수정
- Loading branch information
Showing
8 changed files
with
30 additions
and
38 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,6 @@ | |
import java.time.LocalDateTime; | ||
|
||
public record PeriodReq( | ||
LocalDateTime endDate | ||
LocalDateTime finishDate | ||
) { | ||
} |
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
20 changes: 8 additions & 12 deletions
20
...n/post/controller/CalenderController.java → ...n/post/controller/CalendarController.java
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 |
---|---|---|
@@ -1,28 +1,24 @@ | ||
package com.gongjakso.server.domain.post.controller; | ||
|
||
import com.gongjakso.server.domain.apply.dto.ApplyReq; | ||
import com.gongjakso.server.domain.post.dto.CalenderRes; | ||
import com.gongjakso.server.domain.post.dto.ScrapPost; | ||
import com.gongjakso.server.domain.post.repository.PostScrapRepository; | ||
import com.gongjakso.server.domain.post.service.CalenderService; | ||
import com.gongjakso.server.domain.post.dto.CalendarRes; | ||
import com.gongjakso.server.domain.post.service.CalendarService; | ||
import com.gongjakso.server.global.common.ApplicationResponse; | ||
import com.gongjakso.server.global.security.PrincipalDetails; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import jakarta.transaction.Transactional; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.security.core.annotation.AuthenticationPrincipal; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
@RestController | ||
@RequestMapping("/api/v1/calender") | ||
@RequestMapping("/api/v1/calendar") | ||
@RequiredArgsConstructor | ||
@Tag(name = "Calender", description = "캘린더 관련 API") | ||
public class CalenderController { | ||
private final CalenderService calenderService; | ||
@Tag(name = "Calendar", description = "캘린더 관련 API") | ||
public class CalendarController { | ||
private final CalendarService calendarService; | ||
@Operation(summary = "캘린더 정보 API", description = "자신이 스크랩한 공고 정보 요청") | ||
@GetMapping("") | ||
public ApplicationResponse<CalenderRes> addApply(@AuthenticationPrincipal PrincipalDetails principalDetails, @RequestParam(name = "year", defaultValue = "2024") int year, @RequestParam(name = "month", defaultValue = "11") int month){ | ||
return ApplicationResponse.ok(calenderService.findScrapPost(principalDetails.getMember(),year,month)); | ||
public ApplicationResponse<CalendarRes> addApply(@AuthenticationPrincipal PrincipalDetails principalDetails, @RequestParam(name = "year", defaultValue = "2024") int year, @RequestParam(name = "month", defaultValue = "11") int month){ | ||
return ApplicationResponse.ok(calendarService.findScrapPost(principalDetails.getMember(),year,month)); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/main/java/com/gongjakso/server/domain/post/dto/CalendarRes.java
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,11 @@ | ||
package com.gongjakso.server.domain.post.dto; | ||
|
||
import java.util.List; | ||
|
||
public record CalendarRes( | ||
List<ScrapPost> scrapPosts | ||
) { | ||
public static CalendarRes of(List<ScrapPost> scrapPosts){ | ||
return new CalendarRes(scrapPosts); | ||
} | ||
} |
13 changes: 0 additions & 13 deletions
13
src/main/java/com/gongjakso/server/domain/post/dto/CalenderRes.java
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