diff --git a/src/lib/trollcall/convert/troll.ts b/src/lib/trollcall/convert/troll.ts index 7b59277..f0d92fb 100644 --- a/src/lib/trollcall/convert/troll.ts +++ b/src/lib/trollcall/convert/troll.ts @@ -17,7 +17,8 @@ export async function ServerTrollToClientTroll( : null, class: serverTroll.class ? Class[serverTroll.class] : null, owner: undefined, - flairs: undefined + flairs: undefined, + updatedDate: serverTroll.updatedDate?.getTime() }; return clientTroll; diff --git a/src/types/troll.ts b/src/types/troll.ts index b9be576..ae468bc 100644 --- a/src/types/troll.ts +++ b/src/types/troll.ts @@ -11,7 +11,7 @@ export const ServerTrollSchema = SubmitTrollSchema.shape({ owner: ObjectIdSchema.required(), flairs: yup.array().of(ObjectIdSchema.required()).required(), quirks: ServerQuirkHolderSchema.required(), - updatedDate: yup.date().notRequired() + updatedDate: yup.date() }); export type ServerTroll = WithId>; @@ -22,7 +22,8 @@ export const ClientTrollSchema = SubmitTrollSchema.shape({ quirks: ServerQuirkHolderSchema.required(), trueSign: TrueSignSchema.notRequired(), falseSign: TrueSignSchema.notRequired(), - class: ClassSchema.notRequired() + class: ClassSchema.notRequired(), + updatedDate: yup.number().notRequired() }); export interface ClientTroll extends yup.InferType {