feat: finish back-end work (untested)

This commit is contained in:
2025-11-12 12:58:21 -07:00
parent b6a08573f3
commit 8b351524b8
18 changed files with 300 additions and 27 deletions

View File

@@ -156,8 +156,7 @@ func IsAuthenticated(auth *auth.Authenticator) gin.HandlerFunc {
context.Next()
} else {
if !HandleRefreshToken(session) {
context.String(http.StatusUnauthorized, "Failed to refresh access token")
context.Abort()
context.Redirect(http.StatusSeeOther, "/auth/login")
return
} else {
context.Next()

View File

@@ -33,6 +33,8 @@ func UserInDatabase(pool *pgxpool.Pool) gin.HandlerFunc {
return
}
log.Printf("%d", count)
if count == 0 {
_, exec_err := conn.Exec(context.Background(), queries.USER_CREATE_QUERY, sub_id, nickname)