Remove unneeded error checks

This commit is contained in:
Tom Wiesing 2024-04-08 22:52:37 +02:00
parent e259872bb5
commit b45233b87c
No known key found for this signature in database
3 changed files with 0 additions and 9 deletions

View file

@ -169,9 +169,6 @@ func (panel *UserPanel) tokensAddRoute(ctx context.Context) http.Handler {
Success: func(at addTokenResult, values map[string]string, w http.ResponseWriter, r *http.Request) error {
// add the key to the user
tok, err := panel.dependencies.Tokens.Add(r.Context(), at.User.User.User, at.Description, at.Scopes)
if err != nil {
return err
}
if err != nil {
return errAddToken
}

View file

@ -69,9 +69,6 @@ func (auth *Auth) User(ctx context.Context, name string) (user *AuthUser, err er
if err != nil {
return
}
if err != nil {
return
}
user = &AuthUser{}

View file

@ -71,9 +71,6 @@ func (instances *Instances) Create(slug string, system models.System) (wissKI *w
// docker image
wissKI.Liquid.Instance.System = system
if err != nil {
return nil, err
}
// store the instance in the object and return it!
return wissKI, nil