feat: add list/upload flag UI

This commit is contained in:
Sam 2023-05-29 00:18:02 +02:00
parent a4698e179a
commit 8b03521382
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
10 changed files with 223 additions and 12 deletions

View file

@ -91,6 +91,8 @@ func (s *Server) postUserFlag(w http.ResponseWriter, r *http.Request) error {
if err != nil {
if err == db.ErrInvalidDataURI {
return server.APIError{Code: server.ErrBadRequest, Message: "invalid data URI"}
} else if err == db.ErrFileTooLarge {
return server.APIError{Code: server.ErrBadRequest, Message: "data URI exceeds 512 KB"}
}
return errors.Wrap(err, "converting flag")
}