add validation
This commit is contained in:
1 parent
d852388202
commit
e4525b96c3
1 file changed
+7
@@ -71,6 +71,13 @@ class StatusPageController {
|
|||||||
};
|
};
|
||||||
|
|
||||||
getStatusPageByUrl = async (req, res, next) => {
|
getStatusPageByUrl = async (req, res, next) => {
|
||||||
|
try {
|
||||||
|
await getStatusPageParamValidation.validateAsync(req.params);
|
||||||
|
} catch (error) {
|
||||||
|
next(handleValidationError(error, SERVICE_NAME));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const statusPage = await this.db.getStatusPageByUrl(req.params.url);
|
const statusPage = await this.db.getStatusPageByUrl(req.params.url);
|
||||||
return res.success({
|
return res.success({
|
||||||
|
|||||||
Reference in new issue
Block a user