aboutsummaryrefslogtreecommitdiff
path: root/src/router.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/router.ts')
-rw-r--r--src/router.ts10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/router.ts b/src/router.ts
index abbdc65..ff6c724 100644
--- a/src/router.ts
+++ b/src/router.ts
@@ -24,8 +24,9 @@ export function from(location: Location): Route {
if (xs.length === 2) {
const key = xs[0]
const value = parseInt(xs[1])
- if (key == 'prepare') config.prepare = value
- else if (key == 'tabatas') config.tabatas = value
+ if (key == 'warmup') config.warmup = value
+ else if (key == 'tabatas') config.tabatas = value
+ else if (key == 'prepare') config.prepare = value
else if (key == 'cycles') config.cycles = value
else if (key == 'work') config.work = value
else if (key == 'rest') config.rest = value
@@ -41,10 +42,11 @@ export function toString(route: Route): string {
const path = route.kind === Kind.Form ? '/' : '/timer'
let query = ''
if (route.config !== undefined) {
- const { prepare, tabatas, cycles, work, rest } = route.config
+ const { warmup, tabatas, prepare, cycles, work, rest } = route.config
const params = [
- `prepare=${prepare}`,
+ `warmup=${warmup}`,
`tabatas=${tabatas}`,
+ `prepare=${prepare}`,
`cycles=${cycles}`,
`work=${work}`,
`rest=${rest}`,