mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-01 09:48:37 +00:00
Allow photos with future timestamps (#293)
Set the timestamp to the current time instead of returning 400.
This commit is contained in:
parent
395f2178cd
commit
81993214bf
1 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ public class PhotosController : ControllerBase
|
|||
|
||||
if (photo.Subjects.Count > 4) return this.BadRequest();
|
||||
|
||||
if (photo.Timestamp > TimestampHelper.Timestamp) return this.BadRequest();
|
||||
if (photo.Timestamp > TimestampHelper.Timestamp) photo.Timestamp = TimestampHelper.Timestamp;
|
||||
|
||||
foreach (PhotoSubject subject in photo.Subjects)
|
||||
{
|
||||
|
@ -168,4 +168,4 @@ public class PhotosController : ControllerBase
|
|||
await this.database.SaveChangesAsync();
|
||||
return this.Ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue