mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-16 12:54:38 +00:00
move more stuff into site-kit
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import send from '@polka/send';
|
||||
import get_sections from './_sections.js';
|
||||
import generate_docs from '../../utils/generate_docs.js';
|
||||
|
||||
let json;
|
||||
|
||||
export function get(req, res) {
|
||||
if (!json || process.env.NODE_ENV !== 'production') {
|
||||
json = JSON.stringify(get_sections()); // TODO it errors if I send the non-stringified value
|
||||
json = JSON.stringify(generate_docs('docs')); // TODO it errors if I send the non-stringified value
|
||||
}
|
||||
|
||||
send(res, 200, json, {
|
||||
|
||||
Reference in New Issue
Block a user