mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
refactor(server): use httperror.NewError instead of struct [EE-6189] (#10398)
This commit is contained in:
parent
da346cba60
commit
95f3cf6e5b
26 changed files with 39 additions and 35 deletions
|
@ -151,7 +151,7 @@ func (handler *Handler) deleteExternalStack(r *http.Request, w http.ResponseWrit
|
|||
}
|
||||
|
||||
if !securityContext.IsAdmin {
|
||||
return &httperror.HandlerError{StatusCode: http.StatusUnauthorized, Message: "Permission denied to delete the stack", Err: httperrors.ErrUnauthorized}
|
||||
return httperror.Unauthorized("Permission denied to delete the stack", httperrors.ErrUnauthorized)
|
||||
}
|
||||
|
||||
stack, err := handler.DataStore.Stack().StackByName(stackName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue