Skip to content
Snippets Groups Projects
Commit 161bd5a8 authored by Andrey Azov's avatar Andrey Azov
Browse files

It works?

parent 07b84af1
No related branches found
No related tags found
No related merge requests found
......@@ -7,18 +7,15 @@ const parseMarkdown = require('../scripts/parseMarkdown');
// const index = JSON.parse(fs.readFileSync(indexPath, 'utf-8'));
module.exports = async (req, res) => {
let index;
try {
const index = require('build/indices/index.json');
index = require('build/indices/index.json');
res.json({ success: true });
} catch (error) {
const files = fs.readdirSync('.');
res.json({ error, files });
}
return;
const search = req.query.query;
if (!query) {
res.status(400);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment