Rework db-seeding, so that it doesn't depend on a github auth token
Instead, admins are specified using a JSON file, 'admins.json'. This file is gitignored. If it is not present, there is a default list of admins in 'admins.default.json'.
This commit is contained in:
parent
c6c56c35df
commit
9367f719f2
6 changed files with 84 additions and 88 deletions
|
@ -20,7 +20,11 @@ impl Database {
|
|||
})
|
||||
.on_conflict(
|
||||
OnConflict::column(user::Column::GithubLogin)
|
||||
.update_column(user::Column::GithubLogin)
|
||||
.update_columns([
|
||||
user::Column::Admin,
|
||||
user::Column::EmailAddress,
|
||||
user::Column::GithubUserId,
|
||||
])
|
||||
.to_owned(),
|
||||
)
|
||||
.exec_with_returning(&*tx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue