Geek-Collectors-Network / geek-collectors-network

0 stars 2 forks source link

Adjust project structure #148

Closed FoRVaiS closed 6 months ago

FoRVaiS commented 6 months ago

Summary

Routes

Testing

  1. Spin up resources: make res
  2. Start the api server: npm run -w apps/api start:dev

Verify routes still work

  1. Use Postman (or Thunder Client) to login with dummy admin credentials. http://127.0.0.1:3000/api/v1/auth/login
    • admin@email.com: admin
  2. Expect the following response:
    {
    "isError": false,
    "data": {
    "userId": 1
    },
    "pagination": {
    "prev": null,
    "next": null
    }
    }
FoRVaiS commented 6 months ago

Hours Worked: 3

tgrigoruk commented 6 months ago

If i try a non existing route the response is 404 and contains

"isError": false,
"data": "Route Not Found"

Is this intended behaviour? It could be a problem if one checks the response for isError rather than status code.

FoRVaiS commented 6 months ago

If i try a non existing route the response is 404 and contains

"isError": false,
"data": "Route Not Found"

Is this intended behaviour? It could be a problem if one checks the response for isError rather than status code.

Not intended, I forgot to pass an error into the response function, fixed now.