fix(auth/property): resolve auth token resolution, add property seeder
deploy-chabokan / deploy (push) Canceled after 0s
deploy-chabokan / deploy (push) Canceled after 0s
This commit is contained in:
@@ -26,6 +26,11 @@ exports.loginUser = catchAsync(async (req, res, next) => {
|
||||
maxAge: maxAge * 1000,
|
||||
path: '/',
|
||||
})
|
||||
res.cookie('bm-token', token, {
|
||||
httpOnly: false,
|
||||
maxAge: maxAge * 1000,
|
||||
path: '/',
|
||||
})
|
||||
|
||||
res.status(200).json({
|
||||
status: 'success',
|
||||
@@ -39,6 +44,11 @@ exports.logoutUser = catchAsync(async (req, res, next) => {
|
||||
maxAge: 0,
|
||||
path: '/',
|
||||
})
|
||||
res.cookie('bm-token', '', {
|
||||
httpOnly: false,
|
||||
maxAge: 0,
|
||||
path: '/',
|
||||
})
|
||||
|
||||
res.status(200).json({
|
||||
status: 'success',
|
||||
|
||||
Reference in New Issue
Block a user