mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-08-23 17:14:26 -05:00
Remove reserved profile ID checks to allow all profile IDs during user creation and profile ID updates
This commit is contained in:
@@ -56,9 +56,7 @@ func (user *User) CreateUser(pool *pgxpool.Pool, ctx context.Context) error {
|
||||
return pool.QueryRow(ctx, InsertUser, user.UserId, user.GsbrCode, "", user.NgDeviceId, user.Email, user.UniqueNick).Scan(&user.ProfileId)
|
||||
}
|
||||
|
||||
if user.ProfileId >= 1000000000 {
|
||||
return ErrReservedProfileIDRange
|
||||
}
|
||||
// Reserved profile ID check removed; all profile IDs allowed
|
||||
|
||||
var exists bool
|
||||
err := pool.QueryRow(ctx, IsProfileIDInUse, user.ProfileId).Scan(&exists)
|
||||
@@ -75,9 +73,7 @@ func (user *User) CreateUser(pool *pgxpool.Pool, ctx context.Context) error {
|
||||
}
|
||||
|
||||
func (user *User) UpdateProfileID(pool *pgxpool.Pool, ctx context.Context, newProfileId uint32) error {
|
||||
if newProfileId >= 1000000000 {
|
||||
return ErrReservedProfileIDRange
|
||||
}
|
||||
// Reserved profile ID check removed; all profile IDs allowed
|
||||
|
||||
var exists bool
|
||||
err := pool.QueryRow(ctx, IsProfileIDInUse, newProfileId).Scan(&exists)
|
||||
|
||||
Reference in New Issue
Block a user