-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrouter.js
32 lines (24 loc) · 920 Bytes
/
router.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const Checker = require('./controllers/checker')
const Profile = require('./controllers/profile')
const Recent = require('./controllers/recent')
const Status = require('./controllers/status')
const Auth = require('./controllers/auth')
const Sitemap = require('./controllers/sitemap')
// const cors = require('cors')
module.exports = (app) => {
// API for twitter authentication
app.get('/api/login', Auth.login)
app.get('/api/login/callback', Auth.loginCallback)
app.get('/api/logout', Auth.logout)
// API for checker to get usertimeline from twitter
app.post('/api/fullChecker', Checker.fullChecker)
app.post('/api/simpleChecker', Checker.simpleChecker)
// API for profile
app.post('/api/profile', Profile.getProfile)
// API for Recent
app.get('/api/recent', Recent.getRecent)
// API for Status
app.post('/api/status', Status.getStatus)
// sitemap
app.get('/api/sitemap', Sitemap.getSitemap)
}