Add display in sidebar for impersonation

This commit is contained in:
Eli Ribble 2026-04-02 17:39:16 +00:00
parent 51811132a4
commit 76c395d613
No known key found for this signature in database
11 changed files with 259 additions and 234 deletions

View file

@ -27,6 +27,8 @@ func AddRoutes(r *mux.Router) {
r.Handle("/image/{uuid}", auth.NewEnsureAuth(apiImagePost)).Methods("POST")
r.Handle("/image/{uuid}/content", auth.NewEnsureAuth(apiImageContentGet)).Methods("GET")
r.Handle("/image/{uuid}/content", auth.NewEnsureAuth(apiImageContentPost)).Methods("POST")
impersonation := resource.Impersonation(router)
r.Handle("/impersonation", authenticatedHandlerJSONPost(impersonation.Create)).Methods("POST")
lead := resource.Lead(r)
r.Handle("/leads", authenticatedHandlerJSON(lead.List)).Methods("GET")
r.Handle("/leads", authenticatedHandlerJSONPost(lead.Create)).Methods("POST")

View file

@ -31,7 +31,7 @@ func postSignup(ctx context.Context, r *http.Request, signup reqSignup) (string,
return "", nhttp.NewError("Failed to signup user", err)
}
auth.AddUserSession(r, user)
auth.AddUserSession(ctx, user)
return "/", nil
}