rename callback to handleCallback
This commit is contained in:
parent
797c40b9a0
commit
3440a66f6d
3 changed files with 10 additions and 6 deletions
|
|
@ -22,7 +22,7 @@ const authenticateUser = (req, res) => {
|
||||||
res.redirect(authUrl);
|
res.redirect(authUrl);
|
||||||
};
|
};
|
||||||
|
|
||||||
const callback = async (req, res) => {
|
const handleCallback = async (req, res) => {
|
||||||
const { code } = req.query;
|
const { code } = req.query;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
@ -61,6 +61,6 @@ const getUserProfile = async (req, res) => {
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
authenticateUser,
|
authenticateUser,
|
||||||
callback,
|
handleCallback,
|
||||||
getUserProfile,
|
getUserProfile,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
10
package.json
10
package.json
|
|
@ -11,6 +11,10 @@
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
"dotenv": "^8.2.0"
|
"dotenv": "^8.2.0"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "ExostFlash",
|
||||||
"license": "ISC"
|
"license": "ISC",
|
||||||
}
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "ssh://git@git.lehub.tf:2222/MecDu.Dev/cvgen.git"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ const linkedinController = require("../controllers/linkedin");
|
||||||
router.get("/auth/linkedin", linkedinController.authenticate);
|
router.get("/auth/linkedin", linkedinController.authenticate);
|
||||||
|
|
||||||
// Callback route for LinkedIn OAuth2
|
// Callback route for LinkedIn OAuth2
|
||||||
router.get("/auth/linkedin/callback", linkedinController.callback);
|
router.get("/auth/linkedin/callback", linkedinController.handleCallback);
|
||||||
|
|
||||||
// Route for fetching user profile information
|
// Route for fetching user profile information
|
||||||
router.get("/profile", linkedinController.getProfile);
|
router.get("/profile", linkedinController.getProfile);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue