mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-11-10 22:22:21 +08:00
rename addedAt to lastModified on user/friends
This commit is contained in:
parent
eb93599131
commit
a2a30d1e67
1 changed files with 11 additions and 9 deletions
|
|
@ -13,6 +13,7 @@ import {
|
|||
} from "./shared";
|
||||
import { CustomThemeColorsSchema, FunboxNameSchema } from "./configs";
|
||||
import { doesNotContainProfanity } from "./validation/validation";
|
||||
import { ConnectionSchema } from "./connections";
|
||||
|
||||
const NoneFilterSchema = z.literal("none");
|
||||
export const ResultFiltersSchema = z.object({
|
||||
|
|
@ -384,14 +385,15 @@ export const FriendSchema = UserSchema.pick({
|
|||
xp: true,
|
||||
banned: true,
|
||||
lbOptOut: true,
|
||||
}).extend({
|
||||
addedAt: z.number().int().nonnegative().optional(),
|
||||
connectionId: IdSchema.optional(),
|
||||
top15: PersonalBestSchema.optional(),
|
||||
top60: PersonalBestSchema.optional(),
|
||||
badgeId: z.number().int().optional(),
|
||||
isPremium: z.boolean().optional(),
|
||||
streak: UserStreakSchema.pick({ length: true, maxLength: true }),
|
||||
});
|
||||
})
|
||||
.extend({
|
||||
connectionId: IdSchema.optional(),
|
||||
top15: PersonalBestSchema.optional(),
|
||||
top60: PersonalBestSchema.optional(),
|
||||
badgeId: z.number().int().optional(),
|
||||
isPremium: z.boolean().optional(),
|
||||
streak: UserStreakSchema.pick({ length: true, maxLength: true }),
|
||||
})
|
||||
.merge(ConnectionSchema.pick({ lastModified: true }).partial());
|
||||
|
||||
export type Friend = z.infer<typeof FriendSchema>;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue