You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.6 KiB
36 lines
1.6 KiB
const router = require('express').Router();
|
|
const api = require('../controllers/api.js');
|
|
|
|
module.exports = (worker)=>
|
|
{
|
|
router.route('*').get(api.hasConfig);
|
|
router.route('/config').post(api.configPost);
|
|
|
|
router.route('/').get( api.home);
|
|
router.route('/home').get(api.home);
|
|
router.route('/search').get(api.search)
|
|
.post(api.search);
|
|
router.route('/searchbar').get(api.searchBar);
|
|
router.route('/recommended').get(api.recommended);
|
|
router.route('/continue').get(api.continue);
|
|
router.route('/favorites').get(api.favorites);
|
|
router.route('/bookmark/:scanlator/:title/:idorLink?').post(api.bookmark(worker));
|
|
router.route('/manga/:scanlator/:link/:title').get(api.manga);
|
|
router.route('/chapter/:scanlator/:link/:title/:chapter').get(api.chapter);
|
|
router.route('/removeChapter/:id').get(api.removeChapter)
|
|
router.route('/chaptertocontinue/:scanlator/:mangaLink/:title/').get(api.chapterToContinue);
|
|
router.route('/chapternavinfo/:scanlator/:mangaLink/:title/:chapter').get(api.chapterNavInfo);
|
|
router.route('/dashboard').get(api.dashboard);
|
|
router.route('/login').get(api.loginPage)
|
|
.post(api.login);
|
|
router.route('/logout').get(api.logout);
|
|
router.route('/chapterRead/:scanlator/:link/:title/:chapter/').post(api.chapterRead);
|
|
router.route('/chapterRead/:scanlator/:link/:title/:chapter/:img').post(api.chapterIncompleteRead);
|
|
router.route('/chapterReadLastImage/:scanlator/:link/:title/:chapter/').get(api.chapterLastRead);
|
|
|
|
|
|
//Undefined Routes v
|
|
router.use(api.errorPage);
|
|
return router;
|
|
};
|