Remove reserved profile ID checks to allow all profile IDs during user creation and profile ID updates

This commit is contained in:
Blazico 2025-10-20 00:07:41 +02:00
parent 5cb0b8f2da
commit 24f9838eee

View File

@ -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)