Merge pull request #15 from ClaytonWWilson/edit-profile-frontend

Changed naming from FBAuth to fbAuth
This commit is contained in:
Clayton Wilson 2019-09-29 22:07:25 -04:00 committed by GitHub
commit 5176f0250c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,22 +4,21 @@ const app = require('express')();
const cors = require('cors'); const cors = require('cors');
app.use(cors()); app.use(cors());
const FBAuth = require('./util/FBAuth'); const fbAuth = require('./util/fbAuth');
/*------------------------------------------------------------------* /*------------------------------------------------------------------*
* handlers/users.js * * handlers/users.js *
*------------------------------------------------------------------*/ *------------------------------------------------------------------*/
const {getUserDetails, getProfileInfo, updateProfileInfo} = require('./handlers/users'); const {getUserDetails, getProfileInfo, updateProfileInfo} = require('./handlers/users');
// Returns all data in the users collection
app.get('/getUser/:handle', getUserDetails); app.get('/getUser/:handle', getUserDetails);
// Returns all profile data of the currently logged in user // Returns all profile data of the currently logged in user
// TODO: Add FBAuth // TODO: Add fbAuth
app.get('/getProfileInfo', getProfileInfo); app.get('/getProfileInfo', getProfileInfo);
// Updates the currently logged in user's profile information // Updates the currently logged in user's profile information
// TODO: Add FBAuth // TODO: Add fbAuth
app.post('/updateProfileInfo', updateProfileInfo); app.post('/updateProfileInfo', updateProfileInfo);
/*------------------------------------------------------------------* /*------------------------------------------------------------------*
@ -28,7 +27,7 @@ app.post('/updateProfileInfo', updateProfileInfo);
const {putPost} = require('./handlers/post'); const {putPost} = require('./handlers/post');
// Adds one post to the database // Adds one post to the database
app.post('/putPost', FBAuth, putPost); app.post('/putPost', fbAuth, putPost);
exports.api = functions.https.onRequest(app); exports.api = functions.https.onRequest(app);