MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / GetPasswordBySubToken

Method GetPasswordBySubToken

internal/store/postgres/users.go:671–680  ·  view source on GitHub ↗
(subToken string)

Source from the content-addressed store, hash-verified

669}
670
671func (s *UserStore) GetPasswordBySubToken(subToken string) (string, string, error) {
672 var userID, hash string
673 err := s.db.QueryRow(context.Background(),
674 `SELECT id, password FROM users WHERE sub_token = $1`, subToken,
675 ).Scan(&userID, &hash)
676 if errors.Is(err, pgx.ErrNoRows) {
677 return "", "", users.ErrUserNotFound
678 }
679 return userID, hash, err
680}
681
682func (s *UserStore) GetPasswordByUsername(username string) (string, string, string, error) {
683 var userID, hash, subToken string

Callers

nothing calls this directly

Calls 1

QueryRowMethod · 0.80

Tested by

no test coverage detected