no drifting timestamps

This commit is contained in:
stjet
2026-01-18 18:47:31 +00:00
parent bd565cbe9c
commit 2184053eb5
2 changed files with 3 additions and 3 deletions

4
db.ts
View File

@@ -177,10 +177,10 @@ export async function edit_role_income(role_income_obj: RoleIncome) {
return await role_income.replaceOne({ role: role_income_obj.role }, role_income_obj);
}
export async function update_role_income_last_claim(role: string) {
export async function update_role_income_last_claim(role: string, last_claim: number, hours: number, cycles: number) {
return await role_income.updateOne({ role }, {
$set: {
last_claim: Date.now(),
last_claim: last_claim + hours * cycles * 60 * 60 * 1000,
},
});
}