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);
|
||||
};
|
||||
|
||||
const callback = async (req, res) => {
|
||||
const handleCallback = async (req, res) => {
|
||||
const { code } = req.query;
|
||||
|
||||
try {
|
||||
|
|
@ -61,6 +61,6 @@ const getUserProfile = async (req, res) => {
|
|||
|
||||
module.exports = {
|
||||
authenticateUser,
|
||||
callback,
|
||||
handleCallback,
|
||||
getUserProfile,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@
|
|||
"axios": "^0.21.1",
|
||||
"dotenv": "^8.2.0"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
"author": "ExostFlash",
|
||||
"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);
|
||||
|
||||
// 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
|
||||
router.get("/profile", linkedinController.getProfile);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue