feat: user activation and emails

This commit is contained in:
Riccardo
2023-12-04 16:18:35 +01:00
parent 527fc25c08
commit 37f5692f61
40 changed files with 2093 additions and 310 deletions

28
utils/types.ts Normal file
View File

@@ -0,0 +1,28 @@
import { z } from 'zod';
export const ResponseSchema = z.object({
message: z.string(),
});
export const SubscribeFormSchema = z.object({
email: z.string().email(),
});
export const ConfirmationSchema = z.object({
code: z.string(),
});
export const UnsubscribeFormSchema = z.object({
email: z.string().email(),
});
export const NewsSchema = z.object({
id: z.number(),
title: z.string(),
text: z.string().optional(),
type: z.string(),
by: z.string(),
time: z.number(),
url: z.string().optional(),
score: z.number(),
});