Pull Request branch dev-clone to main #1

Merged
gitea merged 429 commits from dev-clone into main 2024-12-23 09:31:34 +00:00
Showing only changes of commit 7daee35fee - Show all commits

View File

@ -11,6 +11,7 @@ import authInfo from "../../middlewares/authInfo";
import { or, eq } from "drizzle-orm";
import { z } from "zod";
import HonoEnv from "../../types/HonoEnv";
import { notFound } from "../../errors/DashboardError";
const registerFormSchema = z.object({
name: z.string().min(1).max(255),
@ -109,9 +110,7 @@ const respondentsRoute = new Hono<HonoEnv>()
.where(eq(rolesSchema.code, "user"))
.limit(1);
if (!role) {
throw new HTTPException(500, { message: "Role 'user' not found" });
}
if (!role) throw notFound();
await trx.insert(rolesToUsers).values({
userId: newUser.id,