fix: rename duplicate db methods to fix compilation (refs #17)

CreateUser, GetUserByNick, GetUserByToken exist in both db.go (model-based,
used by tests) and queries.go (simple, used by handlers). Rename the
model-based variants to CreateUserModel, GetUserByNickModel, and
GetUserByTokenModel to resolve the compilation error.
This commit is contained in:
clawbot
2026-02-26 06:08:07 -08:00
parent df2217a38b
commit 3f8ceefd52
2 changed files with 24 additions and 24 deletions

View File

@@ -163,7 +163,7 @@ func (s *Database) GetChannelByID(
}
// GetUserByNick looks up a user by their nick.
func (s *Database) GetUserByNick(
func (s *Database) GetUserByNickModel(
ctx context.Context,
nick string,
) (*models.User, error) {
@@ -186,7 +186,7 @@ func (s *Database) GetUserByNick(
}
// GetUserByToken looks up a user by their auth token.
func (s *Database) GetUserByToken(
func (s *Database) GetUserByTokenModel(
ctx context.Context,
token string,
) (*models.User, error) {
@@ -235,7 +235,7 @@ func (s *Database) UpdateUserLastSeen(
}
// CreateUser inserts a new user into the database.
func (s *Database) CreateUser(
func (s *Database) CreateUserModel(
ctx context.Context,
id, nick, passwordHash string,
) (*models.User, error) {