Complete GORM to sqlc migration
- Remove GORM dependency, use sqlc for type-safe SQL queries - Update all handlers to use sqlc patterns (context, value types) - Fix N+1 query problem in domain listing with JOIN query - Enable SQL query logging in debug mode (USE_EMBEDDED=false) - Add comprehensive comments for non-Go developers
This commit is contained in:
parent
dad96978e0
commit
c4e3a31b69
9 changed files with 94 additions and 97 deletions
|
|
@ -49,8 +49,6 @@ func (h *AuthHandler) Login(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
ip := h.getClientIP(c)
|
||||
|
||||
user, err := h.db.GetImcUserByUsername(c.Request.Context(), req.Username)
|
||||
if err != nil || !auth.CheckPassword(req.Password, user.PasswordHash) {
|
||||
Error(c, http.StatusUnauthorized, "invalid credentials")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue