feat: service/controller prototype

This commit is contained in:
2025-06-19 18:37:19 +03:00
parent 912470b6e2
commit 87878f15a3
12 changed files with 258 additions and 12 deletions

View File

@@ -546,12 +546,12 @@ WHERE
users.verified IS TRUE AND -- Verified
users.deleted IS FALSE AND -- Not deleted
banned.user_id IS NULL AND -- Not banned
linfo.password_hash = crypt($2, linfo.password_hash)
linfo.password_hash = crypt($2::text, linfo.password_hash)
`
type GetUserByLoginCredentialsParams struct {
Username string
Crypt string
Password string
}
type GetUserByLoginCredentialsRow struct {
@@ -562,7 +562,7 @@ type GetUserByLoginCredentialsRow struct {
}
func (q *Queries) GetUserByLoginCredentials(ctx context.Context, arg GetUserByLoginCredentialsParams) (GetUserByLoginCredentialsRow, error) {
row := q.db.QueryRow(ctx, getUserByLoginCredentials, arg.Username, arg.Crypt)
row := q.db.QueryRow(ctx, getUserByLoginCredentials, arg.Username, arg.Password)
var i GetUserByLoginCredentialsRow
err := row.Scan(
&i.ID,