1
0
Fork 0
refactor/models
Matthew 2020-05-03 19:08:10 -04:00
parent b4ceed1de1
commit deb2c0fc20
No known key found for this signature in database
GPG Key ID: 766BE43AE75F7559
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}