« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/url-spec.js23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/url-spec.js b/src/url-spec.js
index ea5337a2..8537dfe0 100644
--- a/src/url-spec.js
+++ b/src/url-spec.js
@@ -1,12 +1,16 @@
 import {withEntries} from '#sugar';
 
+const genericPaths = {
+  root: '',
+  path: '<>/',
+};
+
 const urlSpec = {
   data: {
     prefix: 'data/',
 
     paths: {
-      root: '',
-      path: '<>',
+      ...genericPaths,
 
       album: 'album/<>',
       artist: 'artist/<>',
@@ -19,8 +23,7 @@ const urlSpec = {
     // prefix: '_languageCode',
 
     paths: {
-      root: '',
-      path: '<>',
+      ...genericPaths,
       page: '<>/',
 
       home: '',
@@ -61,8 +64,7 @@ const urlSpec = {
 
   shared: {
     paths: {
-      root: '',
-      path: '<>',
+      ...genericPaths,
 
       utilityRoot: 'util',
       staticRoot: 'static',
@@ -78,8 +80,7 @@ const urlSpec = {
     prefix: 'media/',
 
     paths: {
-      root: '',
-      path: '<>',
+      ...genericPaths,
 
       albumAdditionalFile: 'album-additional/<>/<>',
       albumBanner: 'album-art/<>/banner.<>',
@@ -96,11 +97,7 @@ const urlSpec = {
 
   thumb: {
     prefix: 'thumb/',
-
-    paths: {
-      root: '',
-      path: '<>',
-    },
+    paths: genericPaths,
   },
 };