mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-07 07:53:07 +00:00
Apply suggestion changes: return the reservation module error
This commit is contained in:
parent
c437ccf9a7
commit
b64aa5042b
@ -307,11 +307,8 @@ proc updateAvailability(
|
||||
return failure(err)
|
||||
|
||||
if obj.until > 0:
|
||||
without allReservations =? await self.all(Reservation, obj.id):
|
||||
let error = newException(
|
||||
GetFailedError,
|
||||
"Until parameter must be greater or equal the current longest request",
|
||||
)
|
||||
without allReservations =? await self.all(Reservation, obj.id), error:
|
||||
error.msg = "Error updating reservation: " & error.msg
|
||||
return failure(error)
|
||||
|
||||
let requestEnds = allReservations.mapIt(it.validUntil)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user