mirror of
https://github.com/ajnart/homarr.git
synced 2026-02-27 17:00:54 +01:00
feat: add i18n translated form errors (#509)
This commit is contained in:
@@ -183,7 +183,9 @@ export const boardRouter = createTRPCRouter({
|
||||
);
|
||||
}),
|
||||
savePartialBoardSettings: protectedProcedure
|
||||
.input(validation.board.savePartialSettings)
|
||||
.input(
|
||||
validation.board.savePartialSettings.and(z.object({ id: z.string() })),
|
||||
)
|
||||
.mutation(async ({ ctx, input }) => {
|
||||
await throwIfActionForbiddenAsync(
|
||||
ctx,
|
||||
|
||||
@@ -73,7 +73,7 @@ describe("initUser should initialize the first user", () => {
|
||||
confirmPassword: "12345679",
|
||||
});
|
||||
|
||||
await expect(actAsync()).rejects.toThrow("Passwords do not match");
|
||||
await expect(actAsync()).rejects.toThrow("passwordsDoNotMatch");
|
||||
});
|
||||
|
||||
it("should not create a user if the password is too short", async () => {
|
||||
|
||||
@@ -255,6 +255,7 @@ const createUserAsync = async (
|
||||
await db.insert(schema.users).values({
|
||||
id: userId,
|
||||
name: input.username,
|
||||
email: input.email,
|
||||
password: hashedPassword,
|
||||
salt,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user