mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Restore seeding of random GH users in seed-db
Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
parent
fca8cdcb8e
commit
4d55110452
@ -64,9 +64,9 @@ async fn main() {
|
||||
.expect("failed to fetch user")
|
||||
.is_none()
|
||||
{
|
||||
if let Some(email) = &github_user.email {
|
||||
if admin {
|
||||
db.create_user(
|
||||
email,
|
||||
&format!("{}@zed.dev", github_user.login),
|
||||
admin,
|
||||
db::NewUserParams {
|
||||
github_login: github_user.login,
|
||||
@ -76,15 +76,11 @@ async fn main() {
|
||||
)
|
||||
.await
|
||||
.expect("failed to insert user");
|
||||
} else if admin {
|
||||
db.create_user(
|
||||
&format!("{}@zed.dev", github_user.login),
|
||||
admin,
|
||||
db::NewUserParams {
|
||||
github_login: github_user.login,
|
||||
github_user_id: github_user.id,
|
||||
invite_count: 5,
|
||||
},
|
||||
} else {
|
||||
db.get_or_create_user_by_github_account(
|
||||
&github_user.login,
|
||||
Some(github_user.id),
|
||||
github_user.email.as_deref(),
|
||||
)
|
||||
.await
|
||||
.expect("failed to insert user");
|
||||
|
Loading…
Reference in New Issue
Block a user