gothinkster / gothinkster/node-express-realworld-example-app

Id cast error deleting comment

Open
#59 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3.8k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

When I try to send a delete request to remove a comment, specifying an id (integer number), I get the error

Cast to ObjectId failed for value "1" at path "_id" for model "Comment"

I think that's because the model Comment does not specify an id type, so mongoose create a default one.
Am I missing something?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.