Skip to content

Commit

Permalink
返回受影响的数据行数
Browse files Browse the repository at this point in the history
  • Loading branch information
na57 committed May 31, 2024
1 parent 8c6d327 commit fff12fe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "triples-api",
"version": "1.10.2",
"version": "1.11.1",
"description": "对triples进行操作的Restful API",
"main": "index.js",
"type": "module",
Expand All @@ -13,8 +13,8 @@
"cors": "^2.8.5",
"express": "^4.19.2",
"express-jwt": "^8.4.1",
"nagu-owl": "^1.11.11",
"nagu-owl-types": "^1.4.1",
"nagu-owl": "^1.11.12",
"nagu-owl-types": "^1.4.2",
"nagu-triples": "^2.1.0",
"nagu-triples-types": "^1.0.2"
}
Expand Down
3 changes: 2 additions & 1 deletion src/rdf/property.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ const getOrCreateProperty = async (req ,res) => {

const destoryProperty = async (req, res) => {
const cls = res.resource as RdfProperty;
await cls.destroy();
const data = await cls.destroy().catch(error => res.json({ error }));
res.json({
ret: 0,
data,
});
}

Expand Down

0 comments on commit fff12fe

Please sign in to comment.