@stringtale/express
Advanced tools
Comparing version 0.5.3 to 0.5.4
# @stringtale/express | ||
## 0.5.4 | ||
### Patch Changes | ||
- c2e16a3: Fix errror message | ||
## 0.5.3 | ||
@@ -4,0 +10,0 @@ |
@@ -51,3 +51,7 @@ "use strict"; | ||
const data2 = typeof req.body === "string" ? JSON.parse(req.body) : req.body; | ||
if (data2.type == "push") { | ||
if (data2.type === "history") { | ||
const response = await (0, import_node.history)(data2.name, apiKey, loginToken); | ||
res.status(200).json(response); | ||
return; | ||
} else if (data2.type == "push") { | ||
await (0, import_node.push)(data2.values, apiKey, loginToken); | ||
@@ -73,2 +77,4 @@ } else if (data2.type == "login") { | ||
); | ||
} else if (data2.type === "comment") { | ||
await (0, import_node.comment)(data2.comment, data2.link, apiKey, loginToken); | ||
} | ||
@@ -82,3 +88,3 @@ res.status(200).json({ success: true }); | ||
if (e instanceof import_node.StringtaleServerError) { | ||
res.status(e.statusCode).json({ error: e.message }); | ||
res.status(e.statusCode).json({ message: e.message }); | ||
return; | ||
@@ -85,0 +91,0 @@ } |
{ | ||
"name": "@stringtale/express", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"main": "index.js", | ||
@@ -11,4 +11,4 @@ "types": "index.d.ts", | ||
"dependencies": { | ||
"cookie": "^1.0.0", | ||
"@stringtale/node": "^0.5.2" | ||
"@stringtale/node": "^0.5.2", | ||
"cookie": "^1.0.0" | ||
}, | ||
@@ -15,0 +15,0 @@ "devDependencies": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
13016
152
0