mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-11 08:23:45 +00:00
feat(multiplayer): add shared allocation quota
This commit is contained in:
@@ -75,6 +75,9 @@ func ClaimAllocation(ctx context.Context, db *sql.DB, request domain.AllocationR
|
||||
if err != sql.ErrNoRows {
|
||||
return err
|
||||
}
|
||||
if err := consumeAllocationQuotaTx(ctx, tx, request.Region, now); err != nil {
|
||||
return err
|
||||
}
|
||||
var serverID string
|
||||
if err := tx.QueryRowContext(ctx, ClaimReadyServerSQL, request.Region, request.Build, request.Protocol, request.Transport, now).Scan(&serverID); err != nil {
|
||||
if err == sql.ErrNoRows {
|
||||
|
||||
Reference in New Issue
Block a user