update
This commit is contained in:
@ -339,6 +339,7 @@ export class ApplicationController {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const schema = Joi.object().keys({
|
const schema = Joi.object().keys({
|
||||||
|
id: Joi.string().required().label("ID"),
|
||||||
name: Joi.string().max(256).required().label("Name"),
|
name: Joi.string().max(256).required().label("Name"),
|
||||||
reset_password_url: Joi.string()
|
reset_password_url: Joi.string()
|
||||||
.max(512)
|
.max(512)
|
||||||
@ -348,7 +349,9 @@ export class ApplicationController {
|
|||||||
status: Joi.string().required().label("Status"),
|
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);
|
const repo = OrmHelper.DB.getRepository(Application);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user