mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-21 22:39:23 +01:00
require all route helper functions
This commit is contained in:
parent
a441ecac33
commit
57c149d355
@ -2,6 +2,17 @@ const config = require('../config');
|
||||
const { redis, fetch } = require('../app');
|
||||
const homeRoute = require('express').Router();
|
||||
|
||||
const processUser = require('../inc/processJsonUser.js')();
|
||||
const processPost = require('../inc/processJsonPost.js')();
|
||||
const processAbout = require('../inc/processSubredditAbout.js')();
|
||||
const tedditApiUser = require('../inc/teddit_api/handleUser.js')();
|
||||
const processSearches = require('../inc/processSearchResults.js')();
|
||||
const processSubreddit = require('../inc/processJsonSubreddit.js')();
|
||||
const tedditApiSubreddit = require('../inc/teddit_api/handleSubreddit.js')();
|
||||
const processMoreComments = require('../inc/processMoreComments.js')();
|
||||
const processSubredditsExplore =
|
||||
require('../inc/processSubredditsExplore.js')();
|
||||
|
||||
homeRoute.get('/:sort?', async (req, res, next) => {
|
||||
let past = req.query.t;
|
||||
let before = req.query.before;
|
||||
|
@ -2,7 +2,16 @@ const config = require('../config');
|
||||
const { redis, fetch } = require('../app');
|
||||
const saveRoutes = require('express').Router();
|
||||
|
||||
const processUser = require('../inc/processJsonUser.js')();
|
||||
const processPost = require('../inc/processJsonPost.js')();
|
||||
const processAbout = require('../inc/processSubredditAbout.js')();
|
||||
const tedditApiUser = require('../inc/teddit_api/handleUser.js')();
|
||||
const processSearches = require('../inc/processSearchResults.js')();
|
||||
const processSubreddit = require('../inc/processJsonSubreddit.js')();
|
||||
const tedditApiSubreddit = require('../inc/teddit_api/handleSubreddit.js')();
|
||||
const processMoreComments = require('../inc/processMoreComments.js')();
|
||||
const processSubredditsExplore =
|
||||
require('../inc/processSubredditsExplore.js')();
|
||||
|
||||
saveRoutes.get('/saved', (req, res, next) => {
|
||||
let saved = req.cookies.saved;
|
||||
|
@ -2,10 +2,14 @@ const config = require('../config');
|
||||
const { redis, fetch, RedditAPI } = require('../app');
|
||||
const subredditRoutes = require('express').Router();
|
||||
|
||||
const processSubreddit = require('../inc/processJsonSubreddit.js')();
|
||||
const processAbout = require('../inc/processSubredditAbout.js')();
|
||||
const processSearches = require('../inc/processSearchResults.js')();
|
||||
const processUser = require('../inc/processJsonUser.js')();
|
||||
const processPost = require('../inc/processJsonPost.js')();
|
||||
const processAbout = require('../inc/processSubredditAbout.js')();
|
||||
const tedditApiUser = require('../inc/teddit_api/handleUser.js')();
|
||||
const processSearches = require('../inc/processSearchResults.js')();
|
||||
const processSubreddit = require('../inc/processJsonSubreddit.js')();
|
||||
const tedditApiSubreddit = require('../inc/teddit_api/handleSubreddit.js')();
|
||||
const processMoreComments = require('../inc/processMoreComments.js')();
|
||||
const processSubredditsExplore =
|
||||
require('../inc/processSubredditsExplore.js')();
|
||||
|
||||
|
@ -3,6 +3,15 @@ const { redis, fetch } = require('../app');
|
||||
const userRoutes = require('express').Router();
|
||||
|
||||
const processUser = require('../inc/processJsonUser.js')();
|
||||
const processPost = require('../inc/processJsonPost.js')();
|
||||
const processAbout = require('../inc/processSubredditAbout.js')();
|
||||
const tedditApiUser = require('../inc/teddit_api/handleUser.js')();
|
||||
const processSearches = require('../inc/processSearchResults.js')();
|
||||
const processSubreddit = require('../inc/processJsonSubreddit.js')();
|
||||
const tedditApiSubreddit = require('../inc/teddit_api/handleSubreddit.js')();
|
||||
const processMoreComments = require('../inc/processMoreComments.js')();
|
||||
const processSubredditsExplore =
|
||||
require('../inc/processSubredditsExplore.js')();
|
||||
|
||||
userRoutes.get('/user/:user/:kind?', (req, res, next) => {
|
||||
let kind = '';
|
||||
|
Loading…
Reference in New Issue
Block a user