Attempt to insert user into db before creating tag

This commit is contained in:
Dustin Pianalto
2020-10-09 23:21:35 -08:00
parent e6d0e1aa09
commit 8784ef8ef8
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ func (s *UserService) User(id string) (*goff.User, error) {
func (s *UserService) CreateUser(u *goff.User) error {
queryString := `INSERT INTO users (id, banned, logging, steam_id, is_active, is_staff, is_admin)
VALUES ($1, $2, $3, $4, $5, $6, $7)`
VALUES ($1, $2, $3, $4, $5, $6, $7) ON CONFLICT (id) DO NOTHING`
_, err := s.DB.Exec(queryString, u.ID, u.Banned, u.Logging, u.SteamID, u.IsActive, u.IsStaff, u.IsAdmin)
return err
}