Compare commits
2 Commits
f719a0bbf5
...
60a12c97be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60a12c97be | ||
|
|
bb56d1f7c7 |
@@ -71,7 +71,7 @@ export const actions = {
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Redirecting to:', next || `${base}/auth/about/${responseBody.user.id}`);
|
||||
throw redirect(303, next || `${base}/auth/about/${responseBody.user.id}`);
|
||||
console.log('Redirecting to:', next || `${base}/auth/about/${responseBody.user_id}`);
|
||||
throw redirect(303, next || `${base}/auth/about/${responseBody.user_id}`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -249,6 +249,7 @@ func (uc *UserController) LoginHandler(c *gin.Context) {
|
||||
|
||||
c.JSON(http.StatusOK, gin.H{
|
||||
"message": "Login successful",
|
||||
"user_id": user.ID,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"GoMembership/pkg/logger"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
@@ -67,7 +66,6 @@ func (u *User) SetPassword(plaintextPassword string) error {
|
||||
}
|
||||
|
||||
func (u *User) PasswordMatches(plaintextPassword string) (bool, error) {
|
||||
logger.Error.Printf("plaintext: %v user password: %v", plaintextPassword, u.Password)
|
||||
return argon2id.ComparePasswordAndHash(plaintextPassword, u.Password)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user