Merge dev into fix/log-analytics-adjustments

This commit is contained in:
Fred KISSIE
2025-12-10 03:19:14 +01:00
parent 9db2feff77
commit d490cab48c
555 changed files with 9375 additions and 9287 deletions

View File

@@ -19,7 +19,9 @@ const adminGeneratePasswordResetCodeSchema = z.strictObject({
userId: z.string().min(1)
});
export type AdminGeneratePasswordResetCodeBody = z.infer<typeof adminGeneratePasswordResetCodeSchema>;
export type AdminGeneratePasswordResetCodeBody = z.infer<
typeof adminGeneratePasswordResetCodeSchema
>;
export type AdminGeneratePasswordResetCodeResponse = {
token: string;
@@ -32,7 +34,9 @@ export async function adminGeneratePasswordResetCode(
res: Response,
next: NextFunction
): Promise<any> {
const parsedParams = adminGeneratePasswordResetCodeSchema.safeParse(req.params);
const parsedParams = adminGeneratePasswordResetCodeSchema.safeParse(
req.params
);
if (!parsedParams.success) {
return next(
@@ -52,12 +56,7 @@ export async function adminGeneratePasswordResetCode(
.where(eq(users.userId, userId));
if (!existingUser || !existingUser.length) {
return next(
createHttpError(
HttpCode.NOT_FOUND,
"User not found"
)
);
return next(createHttpError(HttpCode.NOT_FOUND, "User not found"));
}
if (existingUser[0].type !== UserType.Internal) {
@@ -122,4 +121,3 @@ export async function adminGeneratePasswordResetCode(
);
}
}