Skip to content

Commit f8a73ec

Browse files
Adjusting the server to work for both the demo and playground pages, as well as allowing external fetch calls to get the theme
1 parent 6d1d05c commit f8a73ec

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/server/index.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ const sortArray = (array, key, order) => {
5656
});
5757
};
5858

59+
const namespace = 'vuetify-drilldown-table/api';
60+
5961

6062
export function makeServer({ environment = 'development' } = {}) {
6163
const server = createServer({
@@ -99,7 +101,13 @@ export function makeServer({ environment = 'development' } = {}) {
99101

100102
// -------------------------------------------------- Routes //
101103
routes() {
102-
this.namespace = 'vuetify-drilldown-table/playground/api';
104+
let namespace = 'vuetify-drilldown-table/api';
105+
106+
if (this.environment === 'playground') {
107+
namespace = 'vuetify-drilldown-table/playground/api';
108+
}
109+
110+
this.namespace = namespace;
103111

104112

105113
// ------------------------- Client Side //
@@ -239,6 +247,8 @@ export function makeServer({ environment = 'development' } = {}) {
239247
},
240248
};
241249
});
250+
251+
this.passthrough('https://cdn.jsdelivr.net/gh/PrismJS/prism@1.29.0/themes/prism-tomorrow.css');
242252
},
243253

244254
// -------------------------------------------------- Seeds //

0 commit comments

Comments
 (0)