Skip to content

Commit

Permalink
Merge pull request #112 from TaetaetaE01/main
Browse files Browse the repository at this point in the history
event 오류 수정
  • Loading branch information
TaetaetaE01 authored Aug 16, 2024
2 parents a397920 + f9f7b0a commit 5089a8f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class EventAdminController {
public ResponseEntity<ApiResponse<Void>> registerEvent(@RequestPart(value = "eventRegisterRequest") EventRegisterRequest eventRegisterRequest,
@RequestPart(value = "file", required = false) List<MultipartFile> multipartFiles) {
eventService.registerEvent(eventRegisterRequest, multipartFiles);
return ResponseEntity.ok().build();
return ResponseEntity.ok(ApiResponse.success(SUCCESS));
}

@PutMapping("/{eventId}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,28 @@
@Builder
@AllArgsConstructor
public class EventResponse {
private Long meetingsId;
private Long eventId;
private String title;
private String content;
private String target;
private LocalDateTime startDateTime;
private LocalDateTime endDateTime;
private LocalDateTime createAt;
private LocalDateTime updateAt;
private Long affiliationId;
private List<FileResponse> fileInfo;

public static EventResponse fromEventResponse(Event event, List<FileResponse> fileInfo) {
return EventResponse.builder()
.meetingsId(event.getId())
.eventId(event.getId())
.title(event.getTitle())
.content(event.getContent())
.target(event.getTarget())
.startDateTime(event.getStartDateTime())
.endDateTime(event.getEndDateTime())
.affiliationId(event.getAffiliationId())
.createAt(event.getCreateAt())
.updateAt(event.getUpdateAt())
.fileInfo(fileInfo)
.build();
}
Expand Down

0 comments on commit 5089a8f

Please sign in to comment.