diff --git a/frontend/pages/projects/_id/labels/_label_id/edit.vue b/frontend/pages/projects/_id/labels/_label_id/edit.vue index cbfd637e..faccf5a4 100644 --- a/frontend/pages/projects/_id/labels/_label_id/edit.vue +++ b/frontend/pages/projects/_id/labels/_label_id/edit.vue @@ -28,7 +28,10 @@ export default Vue.extend({ layout: 'project', - validate({ params, app }) { + validate({ params, query, app }) { + if (!['category', 'span'].includes((query.type as string))) { + return false + } if (/^\d+$/.test(params.id)) { return app.$services.project.findById(params.id) .then((res:ProjectDTO) => { diff --git a/frontend/pages/projects/_id/labels/add.vue b/frontend/pages/projects/_id/labels/add.vue index 0de776a7..94545a7b 100644 --- a/frontend/pages/projects/_id/labels/add.vue +++ b/frontend/pages/projects/_id/labels/add.vue @@ -38,7 +38,10 @@ export default Vue.extend({ layout: 'project', - validate({ params, app }) { + validate({ params, query, app }) { + if (!['category', 'span'].includes((query.type as string))) { + return false + } if (/^\d+$/.test(params.id)) { return app.$services.project.findById(params.id) .then((res:ProjectDTO) => {