Removes response after uploading a photo, and preps things for get photo info endpoint
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package net.halfbinary.scavengerhuntapi.model.converter
|
||||
|
||||
import net.halfbinary.scavengerhuntapi.model.domain.Hunter
|
||||
import net.halfbinary.scavengerhuntapi.model.domain.Photo
|
||||
import net.halfbinary.scavengerhuntapi.model.record.PhotoRecord
|
||||
import net.halfbinary.scavengerhuntapi.model.response.PhotoResponse
|
||||
@@ -14,9 +15,9 @@ fun Photo.toRecord() = PhotoRecord(
|
||||
statusChangeDateTime = statusChangeDateTime
|
||||
)
|
||||
|
||||
fun Photo.toResponse() = PhotoResponse(
|
||||
fun Photo.toResponse(hunter: Hunter) = PhotoResponse(
|
||||
id = id,
|
||||
hunterId = hunterId,
|
||||
hunterName = hunter.name,
|
||||
photoUploadDateTime = foundDateTime,
|
||||
photoStatus = status,
|
||||
photoStatusChangeDateTime = statusChangeDateTime
|
||||
|
||||
Reference in New Issue
Block a user