make itemlock work the same as other statuses

This commit is contained in:
2025-07-25 00:29:47 +01:00
parent 1321af66cd
commit a9c89cd616

View File

@@ -88,8 +88,7 @@ export default class User {
};
public async itemLock(): Promise<boolean> {
const lock = await redis.get(`user:${this.id}:itemlock`);
return lock === '1';
return await redis.exists(`user:${this.id}:itemlock`);
};
public async setLock(): Promise<void> {
@@ -97,7 +96,7 @@ export default class User {
};
public async clearLock(): Promise<void> {
await redis.set(`user:${this.id}:itemlock`, '0');
await redis.del(`user:${this.id}:itemlock`);
};
public async setVulnerable(): Promise<void> {