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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user