From a23438f976e77024be934554b28fb940fc20dcfa Mon Sep 17 00:00:00 2001 From: exyi Date: Mon, 5 Oct 2020 19:50:12 +0000 Subject: [PATCH] KSP url change --- frontend/src/ksp-task-grabber.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend/src/ksp-task-grabber.ts b/frontend/src/ksp-task-grabber.ts index 4739114..d1891e0 100644 --- a/frontend/src/ksp-task-grabber.ts +++ b/frontend/src/ksp-task-grabber.ts @@ -56,16 +56,15 @@ function getLocation(id: string, solution: boolean): TaskLocation | null { const m = /^(\d+)-(Z?)(\d)-(\d)$/.exec(id) if (!m) return null const [_, rocnik, z, serie, uloha] = m + const urlX = solution ? "reseni" : "zadani" if (z == 'Z') { - const urlX = solution ? "reseni" : "zadani" return { - url: `z/ulohy/${rocnik}/${urlX}${serie}.html`, + url: `/z/ulohy/${rocnik}/${urlX}${serie}.html`, startElement: `task-${id}` } } else { - const urlX = solution ? "solution" : "tasks" return { - url: `tasks/${rocnik}/${urlX}${serie}.html`, + url: `/ulohy/${rocnik}/${urlX}${serie}.html`, startElement: `task-${id}` } }