mirror of
https://github.com/ClaytonWWilson/CS307-Team24.git
synced 2026-03-10 21:25:04 +00:00
Merge branch 'master' into edit-profile-info
This commit is contained in:
@@ -1,13 +1,18 @@
|
||||
/* eslint-disable promise/always-return */
|
||||
const functions = require('firebase-functions');
|
||||
const app = require('express')();
|
||||
const cors = require('cors');
|
||||
app.use(cors());
|
||||
|
||||
const FBAuth = require('./util/FBAuth');
|
||||
|
||||
/*------------------------------------------------------------------*
|
||||
* users.js *
|
||||
* handlers/users.js *
|
||||
*------------------------------------------------------------------*/
|
||||
const {getProfileInfo, updateProfileInfo} = require('./handlers/users');
|
||||
const {getUserDetails, getProfileInfo, updateProfileInfo} = require('./handlers/users');
|
||||
|
||||
// Returns all data in the users collection
|
||||
app.get('/getUser/:handle', getUserDetails);
|
||||
|
||||
// Returns all profile data of the currently logged in user
|
||||
// TODO: Add FBAuth
|
||||
@@ -17,5 +22,13 @@ app.get('/getProfileInfo', getProfileInfo);
|
||||
// TODO: Add FBAuth
|
||||
app.post('/updateProfileInfo', updateProfileInfo);
|
||||
|
||||
/*------------------------------------------------------------------*
|
||||
* handlers/post.js *
|
||||
*------------------------------------------------------------------*/
|
||||
const {putPost} = require('./handlers/post');
|
||||
|
||||
// Adds one post to the database
|
||||
app.post('/putPost', FBAuth, putPost);
|
||||
|
||||
|
||||
exports.api = functions.https.onRequest(app);
|
||||
Reference in New Issue
Block a user