feat: service/controller prototype
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user