diff --git a/Backend/controllers/profileCtrl.js b/Backend/controllers/profileCtrl.js
index 3079118..523be67 100644
--- a/Backend/controllers/profileCtrl.js
+++ b/Backend/controllers/profileCtrl.js
@@ -19,4 +19,20 @@ const getProfile = async (req,res)=>{
}
}
-module.exports = {getProfile};
\ No newline at end of file
+const updateProfile = (req,res) =>{
+ const id = req.user
+ Interviewer.updateOne({id:id},req.body)
+ .then((doc)=>{
+ return res.status(200).json({
+ success:true,
+ update:doc,
+ })
+ }).catch((err)=>{
+ return res.status(500).json({
+ success:false,
+ msg:"Update not possible",
+ })
+ })
+}
+
+module.exports = {getProfile,updateProfile};
\ No newline at end of file
diff --git a/Backend/routes/profileRouter.js b/Backend/routes/profileRouter.js
index d3936b0..0b784f2 100644
--- a/Backend/routes/profileRouter.js
+++ b/Backend/routes/profileRouter.js
@@ -5,5 +5,6 @@ const profileCtrl = require('../controllers/profileCtrl')
const verifyUser = require('../middlewares/verifyMW').user;
router.get('/interviewer/own',verifyUser,profileCtrl.getProfile);
+router.post('/interviewer/update',verifyUser,profileCtrl.updateProfile);
module.exports = router;
\ No newline at end of file
diff --git a/Frontend/package-lock.json b/Frontend/package-lock.json
index b22f111..942869d 100644
--- a/Frontend/package-lock.json
+++ b/Frontend/package-lock.json
@@ -1284,9 +1284,9 @@
"integrity": "sha512-QF5CAuYOHE6Zbsn1uEg6wkl836iP+i6C0C/Zs3kF60eebxZvTWp8JSZk19Ar+jj4w+ye8/7H5olu5CqDNjWpEA=="
},
"@firebase/functions": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.5.0.tgz",
- "integrity": "sha512-j7/HVJR8uMlnTgavF8W1Vq+8IRJstxEtSVzK1yUhng7OParUCR+b3uMbMk7pcE+oQdeYTPtRoDf4deggTFws+A==",
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.5.1.tgz",
+ "integrity": "sha512-yyjPZXXvzFPjkGRSqFVS5Hc2Y7Y48GyyMH+M3i7hLGe69r/59w6wzgXKqTiSYmyE1pxfjxU4a1YqBDHNkQkrYQ==",
"requires": {
"@firebase/component": "0.1.19",
"@firebase/functions-types": "0.3.17",
@@ -1446,9 +1446,9 @@
}
},
"@types/node": {
- "version": "12.12.62",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.62.tgz",
- "integrity": "sha512-qAfo81CsD7yQIM9mVyh6B/U47li5g7cfpVQEDMfQeF8pSZVwzbhwU3crc0qG4DmpsebpJPR49AKOExQyJ05Cpg=="
+ "version": "12.12.63",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.63.tgz",
+ "integrity": "sha512-jRP6uNtUKAFz3Cl7zwCKW9hoRSNzuNSsQ3sLGSv5Uf+yWQvx226DF9a0Moa3HADkIp7ae/FhLwlqQzrgfg9hFg=="
},
"ansi-styles": {
"version": "4.3.0",
@@ -6484,9 +6484,9 @@
}
},
"firebase": {
- "version": "7.22.0",
- "resolved": "https://registry.npmjs.org/firebase/-/firebase-7.22.0.tgz",
- "integrity": "sha512-DoE93JoTYppZc+vOB10HDpp49UHPaz4MklE5tJ2XGCZ8ejbU/MOUwOtG4jakAkrl/rZNKVQ6yEimVsQQtZY+5w==",
+ "version": "7.22.1",
+ "resolved": "https://registry.npmjs.org/firebase/-/firebase-7.22.1.tgz",
+ "integrity": "sha512-pMx+Wg6Bl74PNdWxjGLrFxLqtmIB/Ggl8oYQZLl1baa9xPcb9rxut5ZgDcLZlFERBL6vNRhLEszv/+3H827m9A==",
"requires": {
"@firebase/analytics": "0.5.0",
"@firebase/app": "0.6.11",
@@ -6494,7 +6494,7 @@
"@firebase/auth": "0.14.9",
"@firebase/database": "0.6.13",
"@firebase/firestore": "1.17.2",
- "@firebase/functions": "0.5.0",
+ "@firebase/functions": "0.5.1",
"@firebase/installations": "0.4.17",
"@firebase/messaging": "0.7.1",
"@firebase/performance": "0.4.1",
@@ -11241,9 +11241,9 @@
},
"dependencies": {
"@types/node": {
- "version": "13.13.21",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.21.tgz",
- "integrity": "sha512-tlFWakSzBITITJSxHV4hg4KvrhR/7h3xbJdSFbYJBVzKubrASbnnIFuSgolUh7qKGo/ZeJPKUfbZ0WS6Jp14DQ=="
+ "version": "13.13.22",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.22.tgz",
+ "integrity": "sha512-JfiEW8exAjw25GqrY0qyV1KAqkCDXC8osxSGuWVE4HWE3RfVVcxx2IrZUlgd1whLytKI7rxHvqKy9Mh11hC5bw=="
}
}
},
diff --git a/Frontend/package.json b/Frontend/package.json
index 32354f5..993db75 100644
--- a/Frontend/package.json
+++ b/Frontend/package.json
@@ -8,7 +8,7 @@
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
- "firebase": "^7.22.0",
+ "firebase": "^7.22.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-google-login": "^5.1.21",
diff --git a/Frontend/src/app/Main.js b/Frontend/src/app/Main.js
index be8f0ba..a406152 100644
--- a/Frontend/src/app/Main.js
+++ b/Frontend/src/app/Main.js
@@ -5,6 +5,7 @@ import {firebaseConfig} from './config'
import firebase from 'firebase'
import LoginScreen from './components/screens/LoginScreen'
+import RegistrationScreen from './components/screens/RegisterScreen'
function LoadingScreen(props){
@@ -23,9 +24,7 @@ function Main(props){
const googleSigninScript = document.createElement('script');
googleSigninScript.src = "https://apis.google.com/js/platform.js";
- googleSigninScript.onload = ()=>{setScriptLoading(scriptLoading+1)};
-
- firebase.initializeApp(firebaseConfig);
+ googleSigninScript.onload = ()=>{setScriptLoading(scriptLoading+1)};
document.body.append(googleSigninScript);
},[1])
@@ -36,7 +35,7 @@ function Main(props){
{scriptLoading == scriptCount?