From aa12ca7e58563c5c153aa60f5e8f75ad3a95325d Mon Sep 17 00:00:00 2001 From: "fazri.is" Date: Thu, 3 Jul 2025 17:08:41 +0700 Subject: [PATCH] update --- src/controllers/application.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controllers/application.ts b/src/controllers/application.ts index fea1e43..d29afeb 100644 --- a/src/controllers/application.ts +++ b/src/controllers/application.ts @@ -339,6 +339,7 @@ export class ApplicationController { try { const schema = Joi.object().keys({ + id: Joi.string().required().label("ID"), name: Joi.string().max(256).required().label("Name"), reset_password_url: Joi.string() .max(512) @@ -348,7 +349,9 @@ export class ApplicationController { status: Joi.string().required().label("Status"), }); - const param: Application = await schema.validateAsync(req.params); + req.body.id = req.params["id"]; + + const param: Application = await schema.validateAsync(req.body); const repo = OrmHelper.DB.getRepository(Application);