Skip to content

Commit 285c164

Browse files
author
Rishabh Garg
committed
Remove auto expire of session
1 parent c3ecb96 commit 285c164

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

app/controllers/conversation.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class ConversationController {
1111
getRecord = async (request: Request, response: Response, next: NextFunction) => {
1212
try {
1313
let condition = {
14-
// "members" : { $in : [req.user._id] }
14+
"members" : { $in : [request['user']._id!] }
1515
};
1616
if (request.params.id) {
1717
condition["_id"] = request.params.id;

app/utils/auth.util.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ export class AuthUtil {
66
generateToken(info): string {
77
return jwt.sign(
88
{ ...info },
9-
AppConfiguration.SECRET,
10-
{ expiresIn: 60 *60 }
9+
AppConfiguration.SECRET
1110
);
1211
}
1312

@@ -19,7 +18,6 @@ export class AuthUtil {
1918
return jwt.verify(token, AppConfiguration.SECRET);
2019
}
2120
catch (err) {
22-
console.log(err, 'authi')
2321
if (err && (err.name == 'TokenExpiredError')) {
2422
throw CumtomResponse.unAuthorised('Token is expired');
2523
} else if (err) {

0 commit comments

Comments
 (0)