mirror of
https://github.com/notherealmarco/WASAPhoto.git
synced 2025-05-06 12:49:37 +02:00
Add auth error description
This commit is contained in:
parent
038730da3b
commit
44eb1e1fa6
7 changed files with 17 additions and 16 deletions
|
@ -63,7 +63,7 @@ func (rt *_router) PutFollow(w http.ResponseWriter, r *http.Request, ps httprout
|
|||
followed := ps.ByName("follower_uid")
|
||||
|
||||
// send error if the user has no permission to perform this action
|
||||
if !authorization.SendAuthorizationError(ctx.Auth.UserAuthorized, uid, rt.db, w, http.StatusNotFound) {
|
||||
if !authorization.SendAuthorizationError(ctx.Auth.UserAuthorized, uid, rt.db, w, rt.baseLogger, http.StatusNotFound) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ func (rt *_router) DeleteFollow(w http.ResponseWriter, r *http.Request, ps httpr
|
|||
followed := ps.ByName("follower_uid")
|
||||
|
||||
// send error if the user has no permission to perform this action
|
||||
if !authorization.SendAuthorizationError(ctx.Auth.UserAuthorized, uid, rt.db, w, http.StatusNotFound) {
|
||||
if !authorization.SendAuthorizationError(ctx.Auth.UserAuthorized, uid, rt.db, w, rt.baseLogger, http.StatusNotFound) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue