mirror of
https://codeberg.org/tacerus/teddit.git
synced 2024-11-25 08:39:26 +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 { redis, fetch } = require('../app');
|
||||||
const homeRoute = require('express').Router();
|
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) => {
|
homeRoute.get('/:sort?', async (req, res, next) => {
|
||||||
let past = req.query.t;
|
let past = req.query.t;
|
||||||
let before = req.query.before;
|
let before = req.query.before;
|
||||||
|
@ -2,7 +2,16 @@ const config = require('../config');
|
|||||||
const { redis, fetch } = require('../app');
|
const { redis, fetch } = require('../app');
|
||||||
const saveRoutes = require('express').Router();
|
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 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) => {
|
saveRoutes.get('/saved', (req, res, next) => {
|
||||||
let saved = req.cookies.saved;
|
let saved = req.cookies.saved;
|
||||||
|
@ -2,10 +2,14 @@ const config = require('../config');
|
|||||||
const { redis, fetch, RedditAPI } = require('../app');
|
const { redis, fetch, RedditAPI } = require('../app');
|
||||||
const subredditRoutes = require('express').Router();
|
const subredditRoutes = require('express').Router();
|
||||||
|
|
||||||
const processSubreddit = require('../inc/processJsonSubreddit.js')();
|
const processUser = require('../inc/processJsonUser.js')();
|
||||||
const processAbout = require('../inc/processSubredditAbout.js')();
|
|
||||||
const processSearches = require('../inc/processSearchResults.js')();
|
|
||||||
const processPost = require('../inc/processJsonPost.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 =
|
const processSubredditsExplore =
|
||||||
require('../inc/processSubredditsExplore.js')();
|
require('../inc/processSubredditsExplore.js')();
|
||||||
|
|
||||||
|
@ -3,6 +3,15 @@ const { redis, fetch } = require('../app');
|
|||||||
const userRoutes = require('express').Router();
|
const userRoutes = require('express').Router();
|
||||||
|
|
||||||
const processUser = require('../inc/processJsonUser.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')();
|
||||||
|
|
||||||
userRoutes.get('/user/:user/:kind?', (req, res, next) => {
|
userRoutes.get('/user/:user/:kind?', (req, res, next) => {
|
||||||
let kind = '';
|
let kind = '';
|
||||||
|
Loading…
Reference in New Issue
Block a user