Okechi Onyeje cd0100f1a4 T-954157790482088: User can create up to 4 profiles
- using backend validation to ensure no more than four profiles created
-
2018-12-31 08:54:46 -05:00

26 lines
990 B
JavaScript

const AuthHandlers = require('../ups/auth/handlers');
const UserHandlers = require('../ups/users/handlers');
const ProfileHandlers = require('../ups/profiles/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);
app.post('/auth/passwordReset', AuthHandlers.sendPasswordResetEmail)
// Users Endpoints
app.get('/users/by/phone', UserHandlers.findNetworkByPhone);
// Profile Endpoints
app.post('/profiles/', ProfileHandlers.createUserProfile);
}
module.exports = router;