fix updatedDate discrepancy
This commit is contained in:
parent
67e5814952
commit
10a967d69e
2 changed files with 5 additions and 3 deletions
|
@ -17,7 +17,8 @@ export async function ServerTrollToClientTroll(
|
||||||
: null,
|
: null,
|
||||||
class: serverTroll.class ? Class[serverTroll.class] : null,
|
class: serverTroll.class ? Class[serverTroll.class] : null,
|
||||||
owner: undefined,
|
owner: undefined,
|
||||||
flairs: undefined
|
flairs: undefined,
|
||||||
|
updatedDate: serverTroll.updatedDate?.getTime()
|
||||||
};
|
};
|
||||||
|
|
||||||
return clientTroll;
|
return clientTroll;
|
||||||
|
|
|
@ -11,7 +11,7 @@ export const ServerTrollSchema = SubmitTrollSchema.shape({
|
||||||
owner: ObjectIdSchema.required(),
|
owner: ObjectIdSchema.required(),
|
||||||
flairs: yup.array().of(ObjectIdSchema.required()).required(),
|
flairs: yup.array().of(ObjectIdSchema.required()).required(),
|
||||||
quirks: ServerQuirkHolderSchema.required(),
|
quirks: ServerQuirkHolderSchema.required(),
|
||||||
updatedDate: yup.date().notRequired()
|
updatedDate: yup.date()
|
||||||
});
|
});
|
||||||
|
|
||||||
export type ServerTroll = WithId<yup.InferType<typeof ServerTrollSchema>>;
|
export type ServerTroll = WithId<yup.InferType<typeof ServerTrollSchema>>;
|
||||||
|
@ -22,7 +22,8 @@ export const ClientTrollSchema = SubmitTrollSchema.shape({
|
||||||
quirks: ServerQuirkHolderSchema.required(),
|
quirks: ServerQuirkHolderSchema.required(),
|
||||||
trueSign: TrueSignSchema.notRequired(),
|
trueSign: TrueSignSchema.notRequired(),
|
||||||
falseSign: TrueSignSchema.notRequired(),
|
falseSign: TrueSignSchema.notRequired(),
|
||||||
class: ClassSchema.notRequired()
|
class: ClassSchema.notRequired(),
|
||||||
|
updatedDate: yup.number().notRequired()
|
||||||
});
|
});
|
||||||
|
|
||||||
export interface ClientTroll extends yup.InferType<typeof ClientTrollSchema> {
|
export interface ClientTroll extends yup.InferType<typeof ClientTrollSchema> {
|
||||||
|
|
Loading…
Reference in a new issue