mirror of
https://github.com/photoprism/photoprism.git
synced 2025-12-12 00:34:13 +01:00
API: Improve logging of bad request errors across all endpoints #271
Signed-off-by: Michael Mayer <michael@photoprism.app>
This commit is contained in:
@@ -75,7 +75,7 @@ func OAuthRevoke(router *gin.RouterGroup) {
|
||||
// Get the auth token to be revoked from the submitted form values or the request header.
|
||||
if err = c.ShouldBind(&frm); err != nil && authToken == "" {
|
||||
event.AuditWarn([]string{clientIp, "oauth2", actor, action, "%s"}, err)
|
||||
AbortBadRequest(c)
|
||||
AbortBadRequest(c, err)
|
||||
return
|
||||
} else if frm.Empty() {
|
||||
frm.Token = authToken
|
||||
|
||||
Reference in New Issue
Block a user