Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

Commit f800199

Browse files
committed
fix: Add beta_user field to user creation query in UserRepository
1 parent 69d9f63 commit f800199

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

dist/repositories/UserRepository.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class UserRepository {
5858
return await this.databaseService.read(`SELECT user_id, username, verified, isStudio, admin, badges, beta_user, disabled FROM users LIMIT 100`);
5959
}
6060
async createUser(user_id, username, email, password, provider, providerId, created_at) {
61-
await this.databaseService.request("INSERT INTO users (user_id, username, email, password, balance, discord_id, google_id, created_at) VALUES (?, ?, ?, ?, 0, ?, ?, ?)", [
61+
await this.databaseService.request("INSERT INTO users (user_id, username, email, password, balance, discord_id, google_id, created_at, beta_user) VALUES (?, ?, ?, ?, 1000, ?, ?, ?, 1)", [
6262
user_id,
6363
username,
6464
email,

src/repositories/UserRepository.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ export class UserRepository {
9191

9292
async createUser(user_id: string, username: string, email: string, password: string | null, provider?: "discord" | "google", providerId?: string, created_at?: string): Promise<void> {
9393
await this.databaseService.request(
94-
"INSERT INTO users (user_id, username, email, password, balance, discord_id, google_id, created_at) VALUES (?, ?, ?, ?, 0, ?, ?, ?)",
94+
// Temporarily set beta_user to 1 for all new users, and giving them 1000 starting balance
95+
"INSERT INTO users (user_id, username, email, password, balance, discord_id, google_id, created_at, beta_user) VALUES (?, ?, ?, ?, 1000, ?, ?, ?, 1)",
9596
[
9697
user_id,
9798
username,

0 commit comments

Comments
 (0)