15 lines
531 B
JavaScript
15 lines
531 B
JavaScript
// Utilities
|
|
const getSessionId = function (req) {
|
|
const session_id = req.cookies.session_id || req.query.session_id || req.body.session_id;
|
|
return session_id;
|
|
}
|
|
const getUserId = function (req) {
|
|
const user_sid = req.cookies.user_sid || req.query.user_sid || req.body.user_sid;
|
|
return user_sid;
|
|
}
|
|
const getProfileId = function (req) {
|
|
const profile_id = req.cookies.profile_id || req.query.profile_id || req.body.profile_id;
|
|
return profile_id;
|
|
}
|
|
|
|
module.exports = { getSessionId, getUserId, getProfileId }; |