mirror of
https://bitbucket.org/tagfer_team/tagfer-server.git
synced 2025-12-25 03:37:38 +00:00
21 lines
773 B
JavaScript
21 lines
773 B
JavaScript
const AuthHandlers = require('../ups/auth/handlers');
|
|
const UserHandlers = require('../ups/users/handlers');
|
|
|
|
/**
|
|
* Main router for our application, include all routes here. No logic should be added in this file.
|
|
* @param {Express} app
|
|
*/
|
|
function router(app) {
|
|
// Auth Endpoints
|
|
app.get('/auth/email/:email/exists', AuthHandlers.doesAttributeExist );
|
|
app.get('/auth/tagferId/:tagferId/exists', AuthHandlers.doesAttributeExist );
|
|
app.post('/auth/phone/code', AuthHandlers.sendPhoneCode);
|
|
app.post('/auth/phone/verify', AuthHandlers.verifyPhoneCode);
|
|
app.post('/auth/signin', AuthHandlers.signin);
|
|
app.put('/auth/signup', AuthHandlers.signup);
|
|
|
|
// Users Endpoints
|
|
app.get('/users/by/phone', UserHandlers.findNetworkByPhone);
|
|
}
|
|
|
|
module.exports = router; |