User Management: Fix regressions
This commit is contained in:
parent
6f257bd27f
commit
66e57183d6
6 changed files with 17 additions and 10 deletions
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/FAU-CDI/wisski-distillery/internal/models"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/httpx"
|
||||
"github.com/FAU-CDI/wisski-distillery/pkg/lazy"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/julienschmidt/httprouter"
|
||||
)
|
||||
|
||||
//go:embed "html/components.html"
|
||||
|
|
@ -52,7 +52,8 @@ func (admin *Admin) ingredients(r *http.Request) (cp ingredientsContext, err err
|
|||
admin.Dependencies.Custom.Update(&cp, r)
|
||||
|
||||
// find the instance itself!
|
||||
instance, err := admin.Dependencies.Instances.WissKI(r.Context(), mux.Vars(r)["slug"])
|
||||
slug := httprouter.ParamsFromContext(r.Context()).ByName("slug")
|
||||
instance, err := admin.Dependencies.Instances.WissKI(r.Context(), slug)
|
||||
if err == instances.ErrWissKINotFound {
|
||||
return cp, httpx.ErrNotFound
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue