summaryrefslogtreecommitdiff
path: root/auth.go
diff options
context:
space:
mode:
Diffstat (limited to 'auth.go')
-rw-r--r--auth.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/auth.go b/auth.go
index 7be1c1e..c9797f7 100644
--- a/auth.go
+++ b/auth.go
@@ -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)
}