begin extracting user controllers out of routes

This commit is contained in:
Aaron William Po
2023-12-05 22:36:53 -05:00
parent 4b2ce394c1
commit 2ff39613cd
10 changed files with 246 additions and 188 deletions

View File

@@ -15,7 +15,7 @@ export const verifyConfirmationToken = async (token: string) => {
const parsed = BasicUserInfoSchema.safeParse(decoded);
if (!parsed.success) {
throw new Error('Invalid token');
throw new ServerError('Invalid token.', 401);
}
return parsed.data;