feat: finish back-end work (untested)
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user