aboutsummaryrefslogtreecommitdiff
path: root/internal/route/api/v1/user/key.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/route/api/v1/user/key.go')
-rw-r--r--internal/route/api/v1/user/key.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/route/api/v1/user/key.go b/internal/route/api/v1/user/key.go
index 344c7ca2..c80e3bf0 100644
--- a/internal/route/api/v1/user/key.go
+++ b/internal/route/api/v1/user/key.go
@@ -18,7 +18,7 @@ import (
)
func GetUserByParamsName(c *context.APIContext, name string) *db.User {
- user, err := db.GetUserByName(c.Params(name))
+ user, err := db.Users.GetByUsername(c.Req.Context(), c.Params(name))
if err != nil {
c.NotFoundOrError(err, "get user by name")
return nil