fix #3, now tracking cheers and cheerEvents in database, minor tweaks to existing code

This commit is contained in:
2025-08-24 20:20:52 +02:00
parent 97a6a599a8
commit 594d154cab
13 changed files with 108 additions and 15 deletions

View File

@@ -34,11 +34,26 @@ export type timeoutRecord = {
created: string;
};
export type cheerEventRecord = {
id?: string;
user: string;
cheer: string;
created: string;
};
export type cheerRecord = {
id?: string;
user?: string;
amount: number;
};
interface TypedPocketBase extends PocketBase {
collection(idOrName: 'auth'): RecordService<authRecord>;
collection(idOrName: 'users'): RecordService<userRecord>;
collection(idOrName: 'usedItems'): RecordService<usedItemRecord>;
collection(idOrName: 'timeouts'): RecordService<timeoutRecord>;
collection(idOrName: 'cheerEvents'): RecordService<cheerEventRecord>;
collection(idOrName: 'cheers'): RecordService<cheerRecord>;
};
export default new PocketBase(pocketbaseurl).autoCancellation(false) as TypedPocketBase;