From 2f4d747f338e938e7a98efbf532240bf56f003b0 Mon Sep 17 00:00:00 2001 From: Rizky Date: Wed, 18 Oct 2023 06:04:35 +0000 Subject: [PATCH] fix --- app/srv/ws/edit/action/get-comp.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/srv/ws/edit/action/get-comp.ts b/app/srv/ws/edit/action/get-comp.ts index e5b5d340..4650ab71 100644 --- a/app/srv/ws/edit/action/get-comp.ts +++ b/app/srv/ws/edit/action/get-comp.ts @@ -9,13 +9,15 @@ import { WS_MSG_SET_COMP, WS_MSG_SV_LOCAL, } from "../../../../web/src/utils/types/ws"; - +import { validate } from "uuid"; export const getComp = async ( ws: ServerWebSocket, msg: WS_MSG_GET_COMP ) => { const comp_id = msg.comp_id; + if (!validate(comp_id)) return; + if (!eg.edit.comp[comp_id]) { const rawComp = await db.component.findFirst({ where: {