From 6463f89919bea5f71dbb2589a97ce9906591bedf Mon Sep 17 00:00:00 2001 From: Hyosik Philip Joo Date: Thu, 17 Feb 2022 15:23:02 +0900 Subject: [PATCH] [MOVE] Fork and restart --- .../{firebase => Seminar_Server}/.firebaserc | 0 .../{firebase => Seminar_Server}/.gitignore | 2 +- .../firebase.json | 0 .../functions/.eslintrc.js | 0 .../functions/.gitignore | 0 .../functions/.pretterrc.js | 0 .../functions/api/index.js | 3 +- .../api/routes/auth/authLoginEmailPOST.js | 0 .../api/routes/auth/authSignupPOST.js | 0 .../functions/api/routes/auth/googleAuth.js | 50 +++ .../functions/api/routes/auth/index.js | 1 + .../functions/api/routes/index.js | 1 + .../functions/api/routes/kakaoAuth/index.js | 10 + .../functions/api/routes/kakaoAuth/kakao.js | 98 ++++++ .../api/routes/kakaoAuth/verifyToken.js | 15 + .../functions/api/routes/post/index.js | 0 .../functions/api/routes/post/postDELETE.js | 0 .../functions/api/routes/post/postGET.js | 2 +- .../functions/api/routes/post/postListGET.js | 0 .../functions/api/routes/post/postPOST.js | 0 .../functions/api/routes/post/postPUT.js | 0 .../functions/api/routes/scrap/index.js | 0 .../api/routes/scrap/opengraphScrap.js | 22 +- .../functions/api/routes/user/index.js | 0 .../functions/api/routes/user/userDELETE.js | 0 .../functions/api/routes/user/userGET.js | 0 .../functions/api/routes/user/userListGET.js | 0 .../functions/api/routes/user/userPUT.js | 0 .../functions/config/dbConfig.js | 0 .../functions/constants/jwt.js | 0 .../functions/constants/responseMessage.js | 0 .../functions/constants/statusCode.js | 0 .../functions/db/db.js | 0 .../functions/db/index.js | 0 .../functions/db/post.js | 0 .../functions/db/user.js | 0 .../functions/index.js | 0 .../functions/lib/convertSnakeToCamel.js | 0 .../functions/lib/jwtHandlers.js | 0 .../functions/lib/util.js | 0 .../functions/middlewares/auth.js | 0 .../functions/middlewares/uploadImage.js | 0 .../functions/package-lock.json | 309 +++++++++++++++++- .../functions/package.json | 5 +- 44 files changed, 496 insertions(+), 22 deletions(-) rename continues/{firebase => Seminar_Server}/.firebaserc (100%) rename continues/{firebase => Seminar_Server}/.gitignore (97%) rename continues/{firebase => Seminar_Server}/firebase.json (100%) rename continues/{firebase => Seminar_Server}/functions/.eslintrc.js (100%) rename continues/{firebase => Seminar_Server}/functions/.gitignore (100%) rename continues/{firebase => Seminar_Server}/functions/.pretterrc.js (100%) rename continues/{firebase => Seminar_Server}/functions/api/index.js (94%) rename continues/{firebase => Seminar_Server}/functions/api/routes/auth/authLoginEmailPOST.js (100%) rename continues/{firebase => Seminar_Server}/functions/api/routes/auth/authSignupPOST.js (100%) create mode 100644 continues/Seminar_Server/functions/api/routes/auth/googleAuth.js rename continues/{firebase => Seminar_Server}/functions/api/routes/auth/index.js (81%) rename continues/{firebase => Seminar_Server}/functions/api/routes/index.js (83%) create mode 100644 continues/Seminar_Server/functions/api/routes/kakaoAuth/index.js create mode 100644 continues/Seminar_Server/functions/api/routes/kakaoAuth/kakao.js create mode 100644 continues/Seminar_Server/functions/api/routes/kakaoAuth/verifyToken.js rename continues/{firebase => Seminar_Server}/functions/api/routes/post/index.js (100%) rename continues/{firebase => Seminar_Server}/functions/api/routes/post/postDELETE.js (100%) rename continues/{firebase => Seminar_Server}/functions/api/routes/post/postGET.js (97%) rename continues/{firebase => Seminar_Server}/functions/api/routes/post/postListGET.js (100%) rename continues/{firebase => Seminar_Server}/functions/api/routes/post/postPOST.js (100%) rename continues/{firebase => Seminar_Server}/functions/api/routes/post/postPUT.js (100%) rename continues/{firebase => Seminar_Server}/functions/api/routes/scrap/index.js (100%) rename continues/{firebase => Seminar_Server}/functions/api/routes/scrap/opengraphScrap.js (66%) rename continues/{firebase => Seminar_Server}/functions/api/routes/user/index.js (100%) rename continues/{firebase => Seminar_Server}/functions/api/routes/user/userDELETE.js (100%) rename continues/{firebase => Seminar_Server}/functions/api/routes/user/userGET.js (100%) rename continues/{firebase => Seminar_Server}/functions/api/routes/user/userListGET.js (100%) rename continues/{firebase => Seminar_Server}/functions/api/routes/user/userPUT.js (100%) rename continues/{firebase => Seminar_Server}/functions/config/dbConfig.js (100%) rename continues/{firebase => Seminar_Server}/functions/constants/jwt.js (100%) rename continues/{firebase => Seminar_Server}/functions/constants/responseMessage.js (100%) rename continues/{firebase => Seminar_Server}/functions/constants/statusCode.js (100%) rename continues/{firebase => Seminar_Server}/functions/db/db.js (100%) rename continues/{firebase => Seminar_Server}/functions/db/index.js (100%) rename continues/{firebase => Seminar_Server}/functions/db/post.js (100%) rename continues/{firebase => Seminar_Server}/functions/db/user.js (100%) rename continues/{firebase => Seminar_Server}/functions/index.js (100%) rename continues/{firebase => Seminar_Server}/functions/lib/convertSnakeToCamel.js (100%) rename continues/{firebase => Seminar_Server}/functions/lib/jwtHandlers.js (100%) rename continues/{firebase => Seminar_Server}/functions/lib/util.js (100%) rename continues/{firebase => Seminar_Server}/functions/middlewares/auth.js (100%) rename continues/{firebase => Seminar_Server}/functions/middlewares/uploadImage.js (100%) rename continues/{firebase => Seminar_Server}/functions/package-lock.json (93%) rename continues/{firebase => Seminar_Server}/functions/package.json (90%) diff --git a/continues/firebase/.firebaserc b/continues/Seminar_Server/.firebaserc similarity index 100% rename from continues/firebase/.firebaserc rename to continues/Seminar_Server/.firebaserc diff --git a/continues/firebase/.gitignore b/continues/Seminar_Server/.gitignore similarity index 97% rename from continues/firebase/.gitignore rename to continues/Seminar_Server/.gitignore index 447fac5..b453932 100644 --- a/continues/firebase/.gitignore +++ b/continues/Seminar_Server/.gitignore @@ -67,4 +67,4 @@ node_modules/ # Firebase service account functions/wesopt29-29f3e-firebase-adminsdk-hvgq6-57ad4127c1.json -functions/config/firebaseClient.js \ No newline at end of file +functions/config/firebaseClient.js diff --git a/continues/firebase/firebase.json b/continues/Seminar_Server/firebase.json similarity index 100% rename from continues/firebase/firebase.json rename to continues/Seminar_Server/firebase.json diff --git a/continues/firebase/functions/.eslintrc.js b/continues/Seminar_Server/functions/.eslintrc.js similarity index 100% rename from continues/firebase/functions/.eslintrc.js rename to continues/Seminar_Server/functions/.eslintrc.js diff --git a/continues/firebase/functions/.gitignore b/continues/Seminar_Server/functions/.gitignore similarity index 100% rename from continues/firebase/functions/.gitignore rename to continues/Seminar_Server/functions/.gitignore diff --git a/continues/firebase/functions/.pretterrc.js b/continues/Seminar_Server/functions/.pretterrc.js similarity index 100% rename from continues/firebase/functions/.pretterrc.js rename to continues/Seminar_Server/functions/.pretterrc.js diff --git a/continues/firebase/functions/api/index.js b/continues/Seminar_Server/functions/api/index.js similarity index 94% rename from continues/firebase/functions/api/index.js rename to continues/Seminar_Server/functions/api/index.js index 487fe17..f8b2ca1 100644 --- a/continues/firebase/functions/api/index.js +++ b/continues/Seminar_Server/functions/api/index.js @@ -6,6 +6,7 @@ const cookieParser = require("cookie-parser"); const dotenv = require("dotenv"); const hpp = require("hpp"); const helmet = require("helmet"); +const bodyParser = require("body-parser"); // 보안 상 깃허브에 올리면 안 되는 정보를 .env라는 파일로 관리하기 위해 사용하는 모듈 dotenv.config(); @@ -56,6 +57,6 @@ module.exports = functions console.log("\n\n", "[api]", `[${req.method.toUpperCase()}]`, req.originalUrl, req.body); // 맨 위에 선언된 express app 객체를 리턴 - // 요것이 functiobns/index.js 안의 api: require("./api")에 들어가는 것. + // 요것이 functions/index.js 안의 api: require("./api")에 들어가는 것. return app(req, res); }); \ No newline at end of file diff --git a/continues/firebase/functions/api/routes/auth/authLoginEmailPOST.js b/continues/Seminar_Server/functions/api/routes/auth/authLoginEmailPOST.js similarity index 100% rename from continues/firebase/functions/api/routes/auth/authLoginEmailPOST.js rename to continues/Seminar_Server/functions/api/routes/auth/authLoginEmailPOST.js diff --git a/continues/firebase/functions/api/routes/auth/authSignupPOST.js b/continues/Seminar_Server/functions/api/routes/auth/authSignupPOST.js similarity index 100% rename from continues/firebase/functions/api/routes/auth/authSignupPOST.js rename to continues/Seminar_Server/functions/api/routes/auth/authSignupPOST.js diff --git a/continues/Seminar_Server/functions/api/routes/auth/googleAuth.js b/continues/Seminar_Server/functions/api/routes/auth/googleAuth.js new file mode 100644 index 0000000..b5e4662 --- /dev/null +++ b/continues/Seminar_Server/functions/api/routes/auth/googleAuth.js @@ -0,0 +1,50 @@ +const functions = require('firebase-functions'); +const util = require('../../../lib/util'); +const statusCode = require('../../../constants/statusCode'); +const responseMessage = require('../../../constants/responseMessage'); +const {firebaseAuth} = require('../../../config/firebaseClient'); + +module.exports = async(req, res) => { + const script = + ` + // 구글 인증 기능 추가 + var provider = new firebaseAuth.auth.GoogleAuthProvider(); + + // 인증하기 + firebaseAuth.auth().signInWithPopup(provider).then(function(result) { + // This gives you a Google Access Token. You can use it to access the Google API. + var token = result.credential.accessToken; + // The signed-in user info. + var user = result.user; + + console.log(user) // 인증 후 어떤 데이터를 받아오는지 확인해보기 위함. + }).catch(function(error) { + // Handle Errors here. + var errorCode = error.code; + var errorMessage = error.message; + // The email of the user's account used. + var email = error.email; + // The firebase.auth.AuthCredential type that was used. + var credential = error.credential; + // ... + `; + + var html = + ` + + + + 구글 로그인 테스트 + + + 파이어베이스 웹서버 입니다. + + + + + `; + + res.send(html); +}; \ No newline at end of file diff --git a/continues/firebase/functions/api/routes/auth/index.js b/continues/Seminar_Server/functions/api/routes/auth/index.js similarity index 81% rename from continues/firebase/functions/api/routes/auth/index.js rename to continues/Seminar_Server/functions/api/routes/auth/index.js index fe7ce5e..535aa96 100644 --- a/continues/firebase/functions/api/routes/auth/index.js +++ b/continues/Seminar_Server/functions/api/routes/auth/index.js @@ -3,5 +3,6 @@ const router = express.Router(); router.post('/signup', require('./authSignupPOST')); router.post('/login/email', require('./authLoginEmailPOST')); +router.get('/google', require('./googleAuth')); module.exports = router; \ No newline at end of file diff --git a/continues/firebase/functions/api/routes/index.js b/continues/Seminar_Server/functions/api/routes/index.js similarity index 83% rename from continues/firebase/functions/api/routes/index.js rename to continues/Seminar_Server/functions/api/routes/index.js index 1ab29c8..fa19ff9 100644 --- a/continues/firebase/functions/api/routes/index.js +++ b/continues/Seminar_Server/functions/api/routes/index.js @@ -5,4 +5,5 @@ router.use('/auth', require('./auth')); router.use('/user', require('./user')); router.use('/post', require('./post')); router.use('/scrap', require('./scrap')); +//router.use('/kakaoAuth', require('./kakaoAuth')); module.exports = router; \ No newline at end of file diff --git a/continues/Seminar_Server/functions/api/routes/kakaoAuth/index.js b/continues/Seminar_Server/functions/api/routes/kakaoAuth/index.js new file mode 100644 index 0000000..58b2515 --- /dev/null +++ b/continues/Seminar_Server/functions/api/routes/kakaoAuth/index.js @@ -0,0 +1,10 @@ +const express = require('express'); +const router = express.Router(); + +router.get('/', require('./kakao')); +router.post('/verifyToken', require('./verifyToken')); + +module.exports = router; + +/*, +* */ \ No newline at end of file diff --git a/continues/Seminar_Server/functions/api/routes/kakaoAuth/kakao.js b/continues/Seminar_Server/functions/api/routes/kakaoAuth/kakao.js new file mode 100644 index 0000000..ed19288 --- /dev/null +++ b/continues/Seminar_Server/functions/api/routes/kakaoAuth/kakao.js @@ -0,0 +1,98 @@ +'use strict'; + +// import necessary modules +const request = require('request-promise'); + +// Firebase setup +const firebaseAdmin = require('firebase-admin'); + +// Kakao API request url to retrieve user profile based on access token +const requestMeUrl = 'https://kapi.kakao.com/v2/user/me?secure_resource=true'; + +module.exports = (req, res) => { + +/** + * requestMe - Returns user profile from Kakao API + * + * @param {String} kakaoAccessToken Access token retrieved by Kakao Login API + * @return {Promise} User profile response in a promise + */ +function requestMe(kakaoAccessToken) { + console.log('Requesting user profile from Kakao API server.'); + return request({ + method: 'GET', + headers: {'Authorization': 'Bearer ' + kakaoAccessToken}, + url: requestMeUrl, + }); +}; + + +/** + * updateOrCreateUser - Update Firebase user with the give email, create if + * none exists. + * + * @param {String} userId user id per app + * @param {String} email user's email address + * @param {String} displayName user + * @param {String} photoURL profile photo url + * @return {Promise} Firebase user record in a promise + */ +function updateOrCreateUser(userId, email, displayName, photoURL) { + console.log('updating or creating a firebase user'); + const updateParams = { + provider: 'KAKAO', + displayName: displayName, + }; + if (displayName) { + updateParams['displayName'] = displayName; + } else { + updateParams['displayName'] = email; + } + if (photoURL) { + updateParams['photoURL'] = photoURL; + } + console.log(updateParams); + return firebaseAdmin.auth().updateUser(userId, updateParams) + .catch((error) => { + if (error.code === 'auth/user-not-found') { + updateParams['uid'] = userId; + if (email) { + updateParams['email'] = email; + } + return firebaseAdmin.auth().createUser(updateParams); + } + throw error; + }); +}; + + +/** + * createFirebaseToken - returns Firebase token using Firebase Admin SDK + * + * @param {String} kakaoAccessToken access token from Kakao Login API + * @return {Promise} Firebase token in a promise + */ +function createFirebaseToken(kakaoAccessToken) { + return requestMe(kakaoAccessToken).then((response) => { + const body = JSON.parse(response); + console.log(body); + const userId = `kakao:${body.id}`; + if (!userId) { + return response.status(404) + .send({message: 'There was no user with the given access token.'}); + } + let nickname = null; + let profileImage = null; + if (body.properties) { + nickname = body.properties.nickname; + profileImage = body.properties.profile_image; + } + return updateOrCreateUser(userId, body.kaccount_email, nickname, + profileImage); + }).then((userRecord) => { + const userId = userRecord.uid; + console.log(`creating a custom firebase token based on uid ${userId}`); + return firebaseAdmin.auth().createCustomToken(userId, {provider: 'KAKAO'}); + }); +}; +} \ No newline at end of file diff --git a/continues/Seminar_Server/functions/api/routes/kakaoAuth/verifyToken.js b/continues/Seminar_Server/functions/api/routes/kakaoAuth/verifyToken.js new file mode 100644 index 0000000..9e42014 --- /dev/null +++ b/continues/Seminar_Server/functions/api/routes/kakaoAuth/verifyToken.js @@ -0,0 +1,15 @@ +const kakao = require('./kakao'); + +module.exports = async(req, res) => { + + const token = req.body.token; + if (!token) return res.status(400).send({error: 'There is no token.'}) + .send({message: 'Access token is a required parameter.'}); + + console.log(`Verifying Kakao token: ${token}`); + + kakao.createFirebaseToken(token).then((firebaseToken) => { + console.log(`Returning firebase token to user: ${firebaseToken}`); + res.send({firebase_token: firebaseToken}); + }); +}; \ No newline at end of file diff --git a/continues/firebase/functions/api/routes/post/index.js b/continues/Seminar_Server/functions/api/routes/post/index.js similarity index 100% rename from continues/firebase/functions/api/routes/post/index.js rename to continues/Seminar_Server/functions/api/routes/post/index.js diff --git a/continues/firebase/functions/api/routes/post/postDELETE.js b/continues/Seminar_Server/functions/api/routes/post/postDELETE.js similarity index 100% rename from continues/firebase/functions/api/routes/post/postDELETE.js rename to continues/Seminar_Server/functions/api/routes/post/postDELETE.js diff --git a/continues/firebase/functions/api/routes/post/postGET.js b/continues/Seminar_Server/functions/api/routes/post/postGET.js similarity index 97% rename from continues/firebase/functions/api/routes/post/postGET.js rename to continues/Seminar_Server/functions/api/routes/post/postGET.js index 6d59cf1..f41a2ba 100644 --- a/continues/firebase/functions/api/routes/post/postGET.js +++ b/continues/Seminar_Server/functions/api/routes/post/postGET.js @@ -23,7 +23,7 @@ module.exports = async (req, res) => { client = await db.connect(req); // 빌려온 connection을 사용해 우리가 db/[파일].js에서 미리 정의한 SQL 쿼리문을 날려줍니다. - const post = await postDB.getPostByID(client, postId); + const post = await postDB.getPostById(client, postId); if (!post) return res.status(statusCode.NOT_FOUND).send(util.fail(statusCode.NOT_FOUND, responseMessage.NO_POST)); diff --git a/continues/firebase/functions/api/routes/post/postListGET.js b/continues/Seminar_Server/functions/api/routes/post/postListGET.js similarity index 100% rename from continues/firebase/functions/api/routes/post/postListGET.js rename to continues/Seminar_Server/functions/api/routes/post/postListGET.js diff --git a/continues/firebase/functions/api/routes/post/postPOST.js b/continues/Seminar_Server/functions/api/routes/post/postPOST.js similarity index 100% rename from continues/firebase/functions/api/routes/post/postPOST.js rename to continues/Seminar_Server/functions/api/routes/post/postPOST.js diff --git a/continues/firebase/functions/api/routes/post/postPUT.js b/continues/Seminar_Server/functions/api/routes/post/postPUT.js similarity index 100% rename from continues/firebase/functions/api/routes/post/postPUT.js rename to continues/Seminar_Server/functions/api/routes/post/postPUT.js diff --git a/continues/firebase/functions/api/routes/scrap/index.js b/continues/Seminar_Server/functions/api/routes/scrap/index.js similarity index 100% rename from continues/firebase/functions/api/routes/scrap/index.js rename to continues/Seminar_Server/functions/api/routes/scrap/index.js diff --git a/continues/firebase/functions/api/routes/scrap/opengraphScrap.js b/continues/Seminar_Server/functions/api/routes/scrap/opengraphScrap.js similarity index 66% rename from continues/firebase/functions/api/routes/scrap/opengraphScrap.js rename to continues/Seminar_Server/functions/api/routes/scrap/opengraphScrap.js index bf997f2..1624632 100644 --- a/continues/firebase/functions/api/routes/scrap/opengraphScrap.js +++ b/continues/Seminar_Server/functions/api/routes/scrap/opengraphScrap.js @@ -4,15 +4,25 @@ const responseMessage = require('../../../constants/responseMessage'); const ogs = require('open-graph-scraper'); module.exports = async(req, res) => { - const {link} = req.body; try { const data = await ogs({ url : link }); - const response = { - ogTitle: data.result.ogTitle, - ogDescription: data.result.ogDescription, - ogImage: data.result.ogImage, - ogUrl: data.result.ogUrl, + let response; + if (!data.result.ogImage) { + response = { + ogTitle: data.result.ogTitle, + ogDescription: data.result.ogDescription, + ogImage: '', + ogUrl: data.result.ogUrl, + } + } + else { + response = { + ogTitle: data.result.ogTitle, + ogDescription: data.result.ogDescription, + ogImage: data.result.ogImage, + ogUrl: data.result.ogUrl, + } } console.log(data.result) res.status(statusCode.OK).send(util.success(statusCode.OK, responseMessage.READ_ONE_POST_SUCCESS, response)); diff --git a/continues/firebase/functions/api/routes/user/index.js b/continues/Seminar_Server/functions/api/routes/user/index.js similarity index 100% rename from continues/firebase/functions/api/routes/user/index.js rename to continues/Seminar_Server/functions/api/routes/user/index.js diff --git a/continues/firebase/functions/api/routes/user/userDELETE.js b/continues/Seminar_Server/functions/api/routes/user/userDELETE.js similarity index 100% rename from continues/firebase/functions/api/routes/user/userDELETE.js rename to continues/Seminar_Server/functions/api/routes/user/userDELETE.js diff --git a/continues/firebase/functions/api/routes/user/userGET.js b/continues/Seminar_Server/functions/api/routes/user/userGET.js similarity index 100% rename from continues/firebase/functions/api/routes/user/userGET.js rename to continues/Seminar_Server/functions/api/routes/user/userGET.js diff --git a/continues/firebase/functions/api/routes/user/userListGET.js b/continues/Seminar_Server/functions/api/routes/user/userListGET.js similarity index 100% rename from continues/firebase/functions/api/routes/user/userListGET.js rename to continues/Seminar_Server/functions/api/routes/user/userListGET.js diff --git a/continues/firebase/functions/api/routes/user/userPUT.js b/continues/Seminar_Server/functions/api/routes/user/userPUT.js similarity index 100% rename from continues/firebase/functions/api/routes/user/userPUT.js rename to continues/Seminar_Server/functions/api/routes/user/userPUT.js diff --git a/continues/firebase/functions/config/dbConfig.js b/continues/Seminar_Server/functions/config/dbConfig.js similarity index 100% rename from continues/firebase/functions/config/dbConfig.js rename to continues/Seminar_Server/functions/config/dbConfig.js diff --git a/continues/firebase/functions/constants/jwt.js b/continues/Seminar_Server/functions/constants/jwt.js similarity index 100% rename from continues/firebase/functions/constants/jwt.js rename to continues/Seminar_Server/functions/constants/jwt.js diff --git a/continues/firebase/functions/constants/responseMessage.js b/continues/Seminar_Server/functions/constants/responseMessage.js similarity index 100% rename from continues/firebase/functions/constants/responseMessage.js rename to continues/Seminar_Server/functions/constants/responseMessage.js diff --git a/continues/firebase/functions/constants/statusCode.js b/continues/Seminar_Server/functions/constants/statusCode.js similarity index 100% rename from continues/firebase/functions/constants/statusCode.js rename to continues/Seminar_Server/functions/constants/statusCode.js diff --git a/continues/firebase/functions/db/db.js b/continues/Seminar_Server/functions/db/db.js similarity index 100% rename from continues/firebase/functions/db/db.js rename to continues/Seminar_Server/functions/db/db.js diff --git a/continues/firebase/functions/db/index.js b/continues/Seminar_Server/functions/db/index.js similarity index 100% rename from continues/firebase/functions/db/index.js rename to continues/Seminar_Server/functions/db/index.js diff --git a/continues/firebase/functions/db/post.js b/continues/Seminar_Server/functions/db/post.js similarity index 100% rename from continues/firebase/functions/db/post.js rename to continues/Seminar_Server/functions/db/post.js diff --git a/continues/firebase/functions/db/user.js b/continues/Seminar_Server/functions/db/user.js similarity index 100% rename from continues/firebase/functions/db/user.js rename to continues/Seminar_Server/functions/db/user.js diff --git a/continues/firebase/functions/index.js b/continues/Seminar_Server/functions/index.js similarity index 100% rename from continues/firebase/functions/index.js rename to continues/Seminar_Server/functions/index.js diff --git a/continues/firebase/functions/lib/convertSnakeToCamel.js b/continues/Seminar_Server/functions/lib/convertSnakeToCamel.js similarity index 100% rename from continues/firebase/functions/lib/convertSnakeToCamel.js rename to continues/Seminar_Server/functions/lib/convertSnakeToCamel.js diff --git a/continues/firebase/functions/lib/jwtHandlers.js b/continues/Seminar_Server/functions/lib/jwtHandlers.js similarity index 100% rename from continues/firebase/functions/lib/jwtHandlers.js rename to continues/Seminar_Server/functions/lib/jwtHandlers.js diff --git a/continues/firebase/functions/lib/util.js b/continues/Seminar_Server/functions/lib/util.js similarity index 100% rename from continues/firebase/functions/lib/util.js rename to continues/Seminar_Server/functions/lib/util.js diff --git a/continues/firebase/functions/middlewares/auth.js b/continues/Seminar_Server/functions/middlewares/auth.js similarity index 100% rename from continues/firebase/functions/middlewares/auth.js rename to continues/Seminar_Server/functions/middlewares/auth.js diff --git a/continues/firebase/functions/middlewares/uploadImage.js b/continues/Seminar_Server/functions/middlewares/uploadImage.js similarity index 100% rename from continues/firebase/functions/middlewares/uploadImage.js rename to continues/Seminar_Server/functions/middlewares/uploadImage.js diff --git a/continues/firebase/functions/package-lock.json b/continues/Seminar_Server/functions/package-lock.json similarity index 93% rename from continues/firebase/functions/package-lock.json rename to continues/Seminar_Server/functions/package-lock.json index a082a06..8e43626 100644 --- a/continues/firebase/functions/package-lock.json +++ b/continues/Seminar_Server/functions/package-lock.json @@ -905,7 +905,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -952,6 +951,19 @@ "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", "optional": true }, + "asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, "astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -967,6 +979,21 @@ "retry": "0.13.1" } }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -978,12 +1005,25 @@ "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", "optional": true }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, "bignumber.js": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.0.2.tgz", "integrity": "sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw==", "optional": true }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, "body-parser": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.1.tgz", @@ -1088,6 +1128,11 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -1177,6 +1222,14 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, "compressible": { "version": "2.0.18", "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz", @@ -1304,6 +1357,14 @@ "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==" }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, "date-and-time": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/date-and-time/-/date-and-time-2.0.1.tgz", @@ -1356,6 +1417,11 @@ "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==" }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -1455,6 +1521,15 @@ } } }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, "ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -1769,8 +1844,12 @@ "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "optional": true + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { "version": "3.1.3", @@ -1780,8 +1859,7 @@ "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, "fast-levenshtein": { "version": "2.0.6", @@ -1940,6 +2018,21 @@ "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", "dev": true }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, "forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -2010,6 +2103,14 @@ "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", "optional": true }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, "glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", @@ -2169,6 +2270,20 @@ } } }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -2256,6 +2371,16 @@ } } }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, "http2-wrapper": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", @@ -2391,8 +2516,7 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "optional": true + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" }, "isarray": { "version": "1.0.0", @@ -2404,6 +2528,11 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, "jose": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/jose/-/jose-2.0.5.tgz", @@ -2428,6 +2557,11 @@ "esprima": "^4.0.0" } }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, "json-bigint": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", @@ -2442,11 +2576,15 @@ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==" }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -2454,6 +2592,11 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, "jsonwebtoken": { "version": "8.5.1", "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", @@ -2471,6 +2614,17 @@ "semver": "^5.6.0" } }, + "jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, "jszip": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.7.1.tgz", @@ -2769,6 +2923,11 @@ "boolbase": "^1.0.0" } }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -2898,6 +3057,11 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, "pg": { "version": "8.7.1", "resolved": "https://registry.npmjs.org/pg/-/pg-8.7.1.tgz", @@ -3040,6 +3204,11 @@ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -3063,8 +3232,7 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, "qs": { "version": "6.9.6", @@ -3112,6 +3280,64 @@ "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, + "request-promise": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.6.tgz", + "integrity": "sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ==", + "requires": { + "bluebird": "^3.5.0", + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + } + }, + "request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "requires": { + "lodash": "^4.17.19" + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -3297,11 +3523,32 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" + }, "stream-events": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/stream-events/-/stream-events-1.0.5.tgz", @@ -3434,6 +3681,15 @@ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==" }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, "tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -3444,6 +3700,19 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -3495,7 +3764,6 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, "requires": { "punycode": "^2.1.0" } @@ -3532,6 +3800,23 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + } + } + }, "webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", diff --git a/continues/firebase/functions/package.json b/continues/Seminar_Server/functions/package.json similarity index 90% rename from continues/firebase/functions/package.json rename to continues/Seminar_Server/functions/package.json index 9cd9708..6795495 100644 --- a/continues/firebase/functions/package.json +++ b/continues/Seminar_Server/functions/package.json @@ -14,6 +14,7 @@ }, "main": "index.js", "dependencies": { + "body-parser": "^1.19.1", "busboy": "^0.3.1", "cookie-parser": "^1.4.5", "cors": "^2.8.5", @@ -30,7 +31,9 @@ "jsonwebtoken": "^8.5.1", "lodash": "^4.17.21", "open-graph-scraper": "^4.11.0", - "pg": "^8.7.1" + "pg": "^8.7.1", + "request": "^2.88.2", + "request-promise": "^4.2.6" }, "devDependencies": { "eslint": "^7.6.0",