chore(web): use web auth factory directly
(cherry picked from commit 9b01666ec6c41f5487cfc6c381b3937f1fe53a16)
This commit is contained in:
@ -22,6 +22,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
"code.vikunja.io/api/pkg/db"
|
||||
"code.vikunja.io/api/pkg/modules/auth"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
@ -47,7 +48,7 @@ func (c *WebHandler) CreateWeb(ctx echo.Context) error {
|
||||
}
|
||||
|
||||
// Get the user to pass for later checks
|
||||
currentAuth, err := config.AuthProvider.AuthObject(ctx)
|
||||
currentAuth, err := auth.GetAuthFromClaims(ctx)
|
||||
if err != nil {
|
||||
return echo.NewHTTPError(http.StatusInternalServerError, "Could not determine the current user.")
|
||||
}
|
||||
|
Reference in New Issue
Block a user