[autofix.ci] apply automated fixes

This commit is contained in:
autofix-ci[bot]
2025-09-16 07:47:55 +00:00
committed by GitHub
parent d13975adac
commit c1896f8877
4 changed files with 13 additions and 5 deletions
@@ -33,7 +33,10 @@ import { Disable2FA } from "./disable-2fa";
import { Enable2FA } from "./enable-2fa"; import { Enable2FA } from "./enable-2fa";
const profileSchema = z.object({ const profileSchema = z.object({
email: z.string().email("Please enter a valid email address").min(1, "Email is required"), email: z
.string()
.email("Please enter a valid email address")
.min(1, "Email is required"),
password: z.string().nullable(), password: z.string().nullable(),
currentPassword: z.string().nullable(), currentPassword: z.string().nullable(),
image: z.string().optional(), image: z.string().optional(),
+2 -1
View File
@@ -198,7 +198,8 @@ export const userRouter = createTRPCRouter({
} catch (error) { } catch (error) {
throw new TRPCError({ throw new TRPCError({
code: "BAD_REQUEST", code: "BAD_REQUEST",
message: error instanceof Error ? error.message : "Failed to update user", message:
error instanceof Error ? error.message : "Failed to update user",
}); });
} }
}), }),
+5 -1
View File
@@ -322,7 +322,11 @@ export const apiUpdateWebServerMonitoring = z.object({
}); });
export const apiUpdateUser = createSchema.partial().extend({ export const apiUpdateUser = createSchema.partial().extend({
email: z.string().email("Please enter a valid email address").min(1, "Email is required").optional(), email: z
.string()
.email("Please enter a valid email address")
.min(1, "Email is required")
.optional(),
password: z.string().optional(), password: z.string().optional(),
currentPassword: z.string().optional(), currentPassword: z.string().optional(),
name: z.string().optional(), name: z.string().optional(),