Work on All Pages section
This commit is contained in:
		| @@ -135,18 +135,10 @@ router.put('/create/*', (req, res, next) => { | ||||
| // ========================================== | ||||
|  | ||||
| /** | ||||
|  * View list view of all pages | ||||
|  * View tree view of all pages | ||||
|  */ | ||||
| router.get('/all', (req, res, next) => { | ||||
|   entries.getFromTree('/').then((pageData) => { | ||||
|     res.render('pages/all', { pageData }) | ||||
|     return true | ||||
|   }).catch((err) => { | ||||
|     res.render('error', { | ||||
|       message: err.message, | ||||
|       error: {} | ||||
|     }) | ||||
|   }) | ||||
|   res.render('pages/all') | ||||
| }) | ||||
|  | ||||
| // ========================================== | ||||
|   | ||||
| @@ -18,6 +18,19 @@ module.exports = (socket) => { | ||||
|     }) | ||||
|   } | ||||
|  | ||||
|   // ----------------------------------------- | ||||
|   // TREE VIEW (LIST ALL PAGES) | ||||
|   // ----------------------------------------- | ||||
|  | ||||
|   if (socket.request.user.logged_in) { | ||||
|     socket.on('treeFetch', (data, cb) => { | ||||
|       cb = cb || _.noop | ||||
|       entries.getFromTree(data.basePath).then((f) => { | ||||
|         return cb(f) || true | ||||
|       }) | ||||
|     }) | ||||
|   } | ||||
|  | ||||
|   // ----------------------------------------- | ||||
|   // UPLOADS | ||||
|   // ----------------------------------------- | ||||
|   | ||||
		Reference in New Issue
	
	Block a user