fix updatedDate discrepancy

This commit is contained in:
MeowcaTheoRange 2023-08-24 00:57:35 -05:00
parent 67e5814952
commit 10a967d69e
2 changed files with 5 additions and 3 deletions

View file

@ -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;

View file

@ -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<yup.InferType<typeof ServerTrollSchema>>;
@ -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<typeof ClientTrollSchema> {