mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix last message
This commit is contained in:
@@ -16,7 +16,7 @@ export const AttachmentTableSchema = z.object({
|
||||
applicationId: z.number().optional(),
|
||||
docId: z.string().optional(),
|
||||
mimeType: z.string().optional(),
|
||||
id: z.string().optional(),
|
||||
id: z.string().uuid().optional(),
|
||||
description: z.string().optional()
|
||||
})
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import { RoomType } from "src/app/core/chat/entity/group";
|
||||
import { MessageEntity, MessageEntitySchema } from "src/app/core/chat/entity/message";
|
||||
|
||||
export const RoomTableSchema = z.object({
|
||||
id: z.string(),
|
||||
id: z.string().uuid(),
|
||||
roomName: z.string(),
|
||||
createdBy: z.object({
|
||||
wxUserId: z.number(),
|
||||
@@ -20,4 +20,4 @@ export const RoomTableSchema = z.object({
|
||||
|
||||
export type RoomTable = z.infer<typeof RoomTableSchema>
|
||||
export type DexieRoomsTable = EntityTable<RoomTable, 'id'>;
|
||||
export const RoomTableColumn = 'id, createdBy, roomName, roomType, expirationDate, lastMessage'
|
||||
export const RoomTableColumn = 'id, createdBy, roomName, roomType, expirationDate, lastMessage'
|
||||
|
||||
@@ -73,6 +73,10 @@ export class DexieRepository<T, R> implements IDexieRepository<T, R> {
|
||||
return err(new Error('Failed to update document: ' + error.message));
|
||||
}
|
||||
} else {
|
||||
Logger.error(`dexie.js failed to update into ${this.table.name}, invalid data`, {
|
||||
data: document,
|
||||
zodError: dataValidation.error.issues
|
||||
});
|
||||
return err((dataValidation as unknown as ZodError<T>))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ export class SignalRConnection {
|
||||
first()
|
||||
).subscribe(value => {
|
||||
resolve(ok(value.data as unknown as T))
|
||||
console.log('Received valid value:', value);
|
||||
// console.log('Received valid value:', value);
|
||||
});
|
||||
|
||||
} catch(error) {
|
||||
|
||||
Reference in New Issue
Block a user