modified pages data retrival method

This commit is contained in:
Ro 2019-11-19 22:01:31 -08:00
parent 19cb97b9c4
commit 4bde21599e
3 changed files with 2 additions and 11 deletions

View file

@ -1,8 +0,0 @@
const path = require('path');
module.exports = {
'config': path.resolve('config', 'config.json'),
'models-path': path.resolve('brain', 'models'),
'seeders-path': path.resolve('config', 'seeders'),
'migrations-path': path.resolve('config', 'migrations')
}

View file

@ -47,7 +47,7 @@ var post_upload = multer({
Retrieve Pages
*/
router.get('/', (req, res) => {
pagesUtil.retrieve().then(result => {
pagesUtil.grab().then(result => {
res.json(result);
});
});

View file

@ -1,5 +1,4 @@
import Pages from '../../utils/content/Pages';
const express = require('express');
const router = express.Router();
const settings = require('../../../config/site-settings.json');
@ -9,7 +8,7 @@ const settings = require('../../../config/site-settings.json');
//--------------------------
router.get('/', function(req, res) {
let pages = new Pages();
pages.retrieve().then(result => {
pages.grab().then(result => {
let pageData = [];
if (req.session.user) {
pageData = { title: settings.title, status: true, pages: result };