forked from engineering/cloudservices
stuff
parent
b4ceed1de1
commit
deb2c0fc20
|
@ -10,15 +10,15 @@ export default async function existingLimitsSetup(client: Client): Promise<numbe
|
|||
let numOfAccountsUpdated = 0;
|
||||
|
||||
for (const account of accounts) {
|
||||
if (account.tier === 1) {
|
||||
if (account.tier === 1 && account.ramLimitNotification === 20) {
|
||||
await client.db.Account.updateOne({ userID: account.userID }, { $set: { ramLimitNotification: tier1.resourceLimits.ram - 20 } });
|
||||
numOfAccountsUpdated += 1;
|
||||
}
|
||||
if (account.tier === 2) {
|
||||
if (account.tier === 2 && account.ramLimitNotification === 20) {
|
||||
await client.db.Account.updateOne({ userID: account.userID }, { $set: { ramLimitNotification: tier2.resourceLimits.ram - 20 } });
|
||||
numOfAccountsUpdated += 1;
|
||||
}
|
||||
if (account.tier === 3) {
|
||||
if (account.tier === 3 && account.ramLimitNotification === 20) {
|
||||
await client.db.Account.updateOne({ userID: account.userID }, { $set: { ramLimitNotification: tier3.resourceLimits.ram - 20 } });
|
||||
numOfAccountsUpdated += 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue