diff options
Diffstat (limited to 'auth.go')
-rw-r--r-- | auth.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -42,7 +42,7 @@ func RequireAuth(next http.Handler) http.Handler { }) } -func checkLogin(ctx context.Context, user User) (bool, int64) { +func checkLogin(ctx context.Context, user User) (bool, int32) { dbUser, err := Q.GetUserByName(ctx, user.Name) if err == nil { hash := []byte(dbUser.Pwd) @@ -124,6 +124,6 @@ func loginPage() http.HandlerFunc { } } -func userId(r *http.Request) int64 { - return r.Context().Value(userContextKey).(int64) +func userId(r *http.Request) int32 { + return r.Context().Value(userContextKey).(int32) } |