Split remaining controllers into separate files. Added iOS homescreen icon. Removed additional logging from weather module.

This commit is contained in:
Paweł Malak
2021-11-04 23:39:35 +01:00
parent 88694c7e27
commit 4ed29fe276
32 changed files with 418 additions and 312 deletions

View File

@@ -0,0 +1,17 @@
const asyncWrapper = require('../../middleware/asyncWrapper');
const File = require('../../utils/File');
// @desc Get custom queries file
// @route GET /api/queries
// @access Public
const getQueries = asyncWrapper(async (req, res, next) => {
const file = new File('data/customQueries.json');
const content = JSON.parse(file.read());
res.status(200).json({
success: true,
data: content.queries,
});
});
module.exports = getQueries;