Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -62,9 +62,10 @@ public ApiResponse<ApplyListResponse> getApplyListByPreference(@AuthenticationPr
return ApiResponse.onSuccess(applyListResponse);
}

@CheckUserType(userType = UserType.ADMIN)
@GetMapping("/download")
@Operation(summary = "지원자 리스트 엑셀 변환", description = "전체 지원자 리스트를 엑셀 파일로 변환하여 다운로드합니다.")
public ResponseEntity<InputStreamResource> applyListToExcel() throws IOException {
public ResponseEntity<InputStreamResource> applyListToExcel(@AuthenticationPrincipal AuthDetails authDetails) throws IOException {
ByteArrayInputStream in = excelConvertService.applyListToExcel();
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition", "attachment; filename=applicants.xlsx");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public ApiResponse<TicketUpdateResponse> completeCancelForm(@PathVariable(name =
@CheckUserType(userType = UserType.ADMIN)
@GetMapping("/download")
@Operation(summary = "티켓 리스트 엑셀 변환", description = "전체 티켓 리스트를 엑셀 파일로 변환하여 다운로드합니다.")
public ResponseEntity<InputStreamResource> applyListToExcel() throws IOException {
public ResponseEntity<InputStreamResource> applyListToExcel(@AuthenticationPrincipal AuthDetails authDetails) throws IOException {
ByteArrayInputStream in = excelConvertService.ticketListToExcel();
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition", "attachment; filename=tickets.xlsx");
Expand All @@ -97,7 +97,7 @@ public ResponseEntity<InputStreamResource> applyListToExcel() throws IOException
@CheckUserType(userType = UserType.ADMIN)
@GetMapping("/participants/download")
@Operation(summary = "참석자 리스트 엑셀 변환", description = "전체 참석자 리스트를 엑셀 파일로 변환하여 다운로드합니다.")
public ResponseEntity<InputStreamResource> participantsListToExcel() throws IOException {
public ResponseEntity<InputStreamResource> participantsListToExcel(@AuthenticationPrincipal AuthDetails authDetails) throws IOException {
ByteArrayInputStream in = excelConvertService.participantListToExcel();
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Disposition", "attachment; filename=participants.xlsx");
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/kahlua/KahluaProject/service/MailService.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
import org.springframework.transaction.annotation.Transactional;
import org.thymeleaf.context.Context;
import org.thymeleaf.spring6.SpringTemplateEngine;

import java.time.LocalDate;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
@Service
@RequiredArgsConstructor
Expand Down