Skip to content

Commit

Permalink
release: 0.6.5 (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
devxb authored Oct 21, 2024
2 parents 74cf745 + 32e92d6 commit dcac85f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.gitanimals.shop.controller

import org.gitanimals.shop.app.DropPersonaFacade
import org.gitanimals.shop.domain.DropPersona
import org.gitanimals.shop.controller.response.DropPersonaResponse
import org.springframework.http.HttpHeaders
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.PostMapping
Expand All @@ -17,5 +17,6 @@ class DropPersonaController(
fun dropPersona(
@RequestHeader(HttpHeaders.AUTHORIZATION) token: String,
@PathVariable("persona-id") personaId: Long,
): DropPersona = dropPersonaFacade.dropPersona(token, personaId)
): DropPersonaResponse =
DropPersonaResponse.from(dropPersonaFacade.dropPersona(token, personaId))
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package org.gitanimals.shop.controller.response

import org.gitanimals.shop.domain.DropPersona

data class DropPersonaResponse(
val id: String,
val personaId: String,
val droppedUserId: String,
val givenPoint: Long,
) {

companion object {
fun from(dropPersona: DropPersona): DropPersonaResponse {
return DropPersonaResponse(
id = dropPersona.id.toString(),
personaId = dropPersona.personaId.toString(),
droppedUserId = dropPersona.droppedUserId.toString(),
givenPoint = dropPersona.givenPoint,
)
}
}
}

0 comments on commit dcac85f

Please sign in to comment.