change images to use ids instead of hashes

This commit is contained in:
rubikscraft
2022-04-16 17:22:50 +02:00
parent bd20c99f84
commit 84aabbd49a
10 changed files with 37 additions and 51 deletions

View File

@@ -1,10 +1,8 @@
import { z } from 'zod';
import { SHA256Regex } from '../util/common-regex';
import { IsEntityID } from '../validators/entity-id.validator';
export const EImageSchema = z.object({
id: IsEntityID().optional(),
hash: z.string().regex(SHA256Regex),
id: IsEntityID(),
data: z.undefined(),
mime: z.string(),
});