some fixes and new features

This commit is contained in:
2026-01-23 15:14:21 +03:00
parent 336abd5517
commit 65e6dfabd7
9 changed files with 80 additions and 31 deletions

View File

@@ -69,7 +69,7 @@ func (rep *UserRepository) GetOrCreate(tgId int, name string) (*User, error) {
func (rep *UserRepository) Create(id int, name string) (*User, error) {
user := new(User)
err := rep.db.Get(user, "INSERT INTO users (id, name) VALUES (?, ?) RETURNING *;", id, name)
err := rep.db.Get(user, "INSERT INTO users (id, name) VALUES ($1, $2) RETURNING *;", id, name)
return user, err
}