mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix bold
This commit is contained in:
@@ -15,7 +15,8 @@ export const RoomTableSchema = z.object({
|
||||
createdAt: z.any(),
|
||||
expirationDate: z.any().nullable(),
|
||||
roomType: z.nativeEnum(RoomType),
|
||||
messages: MessageEntitySchema.array().optional()
|
||||
messages: MessageEntitySchema.array().optional(),
|
||||
bold: z.number().optional()
|
||||
})
|
||||
|
||||
export type RoomTable = z.infer<typeof RoomTableSchema>
|
||||
|
||||
@@ -85,7 +85,9 @@ export class DexieRepository<T, R> implements IDexieRepository<T, R> {
|
||||
const ids = await this.table.bulkAdd(documents as any);
|
||||
return ok(ids);
|
||||
} catch (error) {
|
||||
|
||||
Logger.error(`dexie.js failed to insert many into ${this.table.name}`, {
|
||||
data: document
|
||||
});
|
||||
return err(new Error('Failed to insert multiple documents: ' + error.message));
|
||||
}
|
||||
}
|
||||
@@ -155,6 +157,9 @@ export class DexieRepository<T, R> implements IDexieRepository<T, R> {
|
||||
const documents: any = await this.table.where(filter).toArray();
|
||||
return ok(documents);
|
||||
} catch (error) {
|
||||
Logger.error(`dexie.js failed to find into ${this.table.name}`, {
|
||||
data: filter,
|
||||
});
|
||||
return err(new Error('Failed to find documents: ' + error.message));
|
||||
}
|
||||
}
|
||||
@@ -164,7 +169,10 @@ export class DexieRepository<T, R> implements IDexieRepository<T, R> {
|
||||
const document = await this.table.where(filter).first();
|
||||
return ok(document);
|
||||
} catch (error) {
|
||||
console.log(filter)
|
||||
Logger.error(`dexie.js failed to findOne into ${this.table.name}`, {
|
||||
data: filter,
|
||||
error
|
||||
});
|
||||
return err(new Error('Failed to find document: ' + error.message));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user