Skip to content

Commit

Permalink
Update last_updated when uploading clan image
Browse files Browse the repository at this point in the history
  • Loading branch information
Swan committed Oct 12, 2024
1 parent 5327ba6 commit ee9a030
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions handlers/clan_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ func uploadClanImage(c *gin.Context, imageType ClanImage) *APIError {
return APIErrorServerError("Failed to upload file", err)
}

if err := clan.UpdateLastUpdated(); err != nil {
return APIErrorServerError("Error updating last_updated for clan", err)
}

c.JSON(http.StatusOK, gin.H{
"message": fmt.Sprintf("Your %v has been successfully uploaded.", clanImageString(imageType)),
})
Expand Down

0 comments on commit ee9a030

Please sign in to comment.