Skip to content

Commit

Permalink
Merge pull request #71 from mash-up-kr/fix/index-error
Browse files Browse the repository at this point in the history
�fix: Fix index error
  • Loading branch information
210-reverof committed Aug 19, 2024
2 parents c78a613 + bc85d9b commit fb896c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.mashup.pic.event.controller.dto

import com.mashup.pic.event.applicationService.dto.UploadImageServiceRequest
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Size

data class UploadImageRequest(
val eventId: Long,
val imageUrls: List<String>
@field:NotNull val eventId: Long,
@field:Size(min = 1) val imageUrls: List<String>
)

fun UploadImageRequest.toServiceRequest(userId: Long): UploadImageServiceRequest = UploadImageServiceRequest(userId, eventId, imageUrls)
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class VoteApplicationService(
voteService.markVoted(request.userId, request.eventId)

if (voteService.hasEveryoneVoted(request.eventId)) {
resultService.generateResult(request.eventId)
eventService.endEventVoting(request.eventId)
resultService.generateResult(10)
}

val randomImageUrl = voteService.getVotedRandomImageUrl(request.userId, request.eventId)
Expand Down

0 comments on commit fb896c4

Please sign in to comment.