AvanthikaMeenakshi / knex-tutorial

4 stars 1 forks source link

POST endpoint returns 404 #1

Open geochronology opened 4 years ago

geochronology commented 4 years ago

When this repo is cloned and run locally, the POST endpoint returns a 404.

I tried it both with and without parameters and ended up with the same result.

image

AvanthikaMeenakshi commented 4 years ago

Hi @geochronology ! Thanks for pointing this out. I have updated the codebase and have sent the updated article to logrocket for review as well. All the end points are working at the moment.

POST:

Screenshot 2020-07-29 at 10 48 42 pm

GET by /:id

Screenshot 2020-07-29 at 10 47 28 pm

PATCH by /:id

Screenshot 2020-07-29 at 10 48 08 pm

DELETE by /:id

Screenshot 2020-07-29 at 10 48 24 pm

Once again, thanks a lot for pointing this out. I was working on multiple boilerplates when I wrote the article and did not notice that I haven't pushed the code to branch. Hope this helps!

Thanks,

Avanthika.

geochronology commented 4 years ago

Hi Avanthika,

Thanks for the prompt response on both issues! Funny enough, despite the popularity of Knex, it's really difficult to find good tutorials on it, particularly with a Postgres configuration (which is what we use where I work). I'm glad my feedback was helpful.

Cheers, Christian

On Wed, Jul 29, 2020 at 2:52 PM Avanthika notifications@github.com wrote:

Hi @geochronology https://github.com/geochronology ! Thanks for pointing this out. I have updated the codebase and have sent the updated article to logrocket for review as well. All the end points are working at the moment.

POST:

[image: Screenshot 2020-07-29 at 10 48 42 pm] https://user-images.githubusercontent.com/14136164/88857320-fa004f00-d1ed-11ea-98e2-aaf2f8b8d6b1.png

GET by /:id

[image: Screenshot 2020-07-29 at 10 47 28 pm] https://user-images.githubusercontent.com/14136164/88857335-008ec680-d1ee-11ea-9309-92b29b029b29.png

PATCH by /:id

[image: Screenshot 2020-07-29 at 10 48 08 pm] https://user-images.githubusercontent.com/14136164/88857349-08e70180-d1ee-11ea-9809-64301a6aef50.png

DELETE by /:id

[image: Screenshot 2020-07-29 at 10 48 24 pm] https://user-images.githubusercontent.com/14136164/88857373-1603f080-d1ee-11ea-93ca-e7ce8e67afe0.png

Once again, thanks a lot for pointing this out. I was working on multiple boilerplates when I wrote the article and did not notice that I haven't pushed the code to branch. Hope this helps!

Thanks,

Avanthika.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/AvanthikaMeenakshi/knex-tutorial/issues/1#issuecomment-665949040, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM66HPA5R6PQ47MDQVQCJ43R6CK3TANCNFSM4PK6IALQ .