fixed error code

This commit is contained in:
Nikolai Petukhov 2024-10-12 11:21:47 +03:00
parent b215e22f53
commit 89c9d7f901
2 changed files with 27 additions and 1 deletions

26
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,26 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/server/index.js"
},
{
"name": "attach",
"type": "pwa-node",
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"processId": "${command:PickProcess}"
}
]
}

View File

@ -6,7 +6,7 @@ function verifyToken(req, res, next) {
const token = req.headers['authorization']?.split(' ')[1];
if (!token) {
return res.status(403).send({ message: 'No token provided' });
return res.status(401).send({ message: 'No token provided' });
}
// Verify token