Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Commit

Permalink
use remove in stead of delete (typeorm#4574)
Browse files Browse the repository at this point in the history
the `remove` method requires the entity itself as input. To remove a record based on it's id, you need to use `delete`
  • Loading branch information
thomasgieling authored and pleerock committed Sep 5, 2019
1 parent a925be9 commit 587d534
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/example-with-express.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ createConnection().then(connection => {
});

app.delete("/users/:id", async function(req: Request, res: Response) {
const results = await userRepository.remove(req.params.id);
const results = await userRepository.delete(req.params.id);
return res.send(results);
});

Expand Down

0 comments on commit 587d534

Please sign in to comment.