Migrate to PostgreSQL and fix related issues
This commit is contained in:
parent
0b8fbea6c3
commit
a89a9776c3
17 changed files with 176 additions and 174 deletions
|
|
@ -16,7 +16,7 @@ func FirstAccountCheck() (bool, error) {
|
|||
}
|
||||
|
||||
var user models.User
|
||||
result := db.First(&user, "is_admin = 1")
|
||||
result := db.First(&user, "is_admin = ?", true)
|
||||
|
||||
if errors.Is(result.Error, gorm.ErrRecordNotFound) {
|
||||
return false, nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue