feat: some shit
Some checks failed
Deploy to GitHub Pages / build_site (push) Has been cancelled

This commit is contained in:
max_richter 2024-12-20 12:21:46 +01:00
parent 9d698be86f
commit eadd37bfa4
5 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi"; import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi";
import { HTTPException } from "hono/http-exception"; import { HTTPException } from "hono/http-exception";
import { idRegex, NodeDefinitionSchema } from "./schemas/types.ts"; import { idRegex, NodeDefinitionSchema } from "./validations/types.ts";
import * as service from "./node.service.ts"; import * as service from "./node.service.ts";
import { bodyLimit } from "hono/body-limit"; import { bodyLimit } from "hono/body-limit";
@ -13,7 +13,7 @@ const SingleParam = (name: string) =>
.max(20) .max(20)
.refine( .refine(
(value) => idRegex.test(value), (value) => idRegex.test(value),
"Name should contain only alphabets", `${name} should contain only letters, numbers, "-" or "_"`,
) )
.openapi({ param: { name, in: "path" } }); .openapi({ param: { name, in: "path" } });
@ -129,7 +129,6 @@ const getNodeWasmRoute = createRoute({
nodeRouter.openapi(getNodeWasmRoute, async (c) => { nodeRouter.openapi(getNodeWasmRoute, async (c) => {
const { user, system, nodeId } = c.req.valid("param"); const { user, system, nodeId } = c.req.valid("param");
const a = performance.now();
const wasmContent = await service.getNodeWasmById( const wasmContent = await service.getNodeWasmById(
user, user,
system, system,

View File

@ -1,7 +1,8 @@
import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi"; import { createRoute, OpenAPIHono, z } from "@hono/zod-openapi";
import { UserSchema, usersTable } from "./user.schema.ts"; import { usersTable } from "./user.schema.ts";
import { db } from "../../db/db.ts"; import { db } from "../../db/db.ts";
import { findUserByName } from "./user.service.ts"; import { findUserByName } from "./user.service.ts";
import { UserSchema } from "./user.validation.ts";
const userRouter = new OpenAPIHono(); const userRouter = new OpenAPIHono();