Skip to content

Commit

Permalink
build: remove cookie parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Guilhermeasper committed May 5, 2024
1 parent 9aa0081 commit d4c0996
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 27 deletions.
21 changes: 0 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"main": "dist",
"dependencies": {
"axios": "^1.4.0",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"crypto-js": "^4.2.0",
"date-fns": "^2.30.0",
Expand Down
3 changes: 0 additions & 3 deletions src/controllers/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,6 @@ class UserController {
return res.status(500).json({ message: 'Unknown Error' });
}

res.cookie('access_token', '', { maxAge: 0 });
res.cookie('refresh_token', '', { maxAge: 0 });

return res.status(200).json({ message: 'User deleted' });
}

Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { mongoConnection } from './database/mongo';
import http from 'http';
import https from 'https';
import fs from 'fs';
import cookieParse from 'cookie-parser';

const app: Express = express();

Expand Down Expand Up @@ -41,7 +40,6 @@ app.use(
),
);

app.use(cookieParse());
app.use(express.json());
app.use(cors(corsOptionsDelegate));
app.use(express.urlencoded({ extended: true }));
Expand Down

0 comments on commit d4c0996

Please sign in to comment.