discourse-js
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -76,14 +76,11 @@ export default function Posts(discourse) { | ||
this.postAction = (_ref2) => { | ||
this.postAction = async (_ref2) => { | ||
let { | ||
method = 'POST', | ||
method = 'post', | ||
body = {}, | ||
id = null | ||
} = _ref2; | ||
return new Promise((resolve, reject) => { | ||
discourse.DiscourseResource({ | ||
method, | ||
path: id ? "post_actions/".concat(id) : 'post_actions', | ||
body | ||
}).then(response => resolve(response)).catch(error => reject(error)); | ||
return discourse[method]({ | ||
path: id ? "post_actions/".concat(id) : 'post_actions', | ||
body | ||
}); | ||
@@ -109,3 +106,3 @@ }; | ||
return this.postAction({ | ||
method: 'DELETE', | ||
method: 'delete', | ||
body: { | ||
@@ -112,0 +109,0 @@ post_action_type_id: 2 |
{ | ||
"name": "discourse-js", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "A client-side javascript wrapper for the discourse API.", | ||
@@ -19,3 +19,3 @@ "main": "lib/index.js", | ||
"prepare": "yarn run build", | ||
"version": "npm run format:write && git add -A src", | ||
"version": "yarn run format:write && git add -A src", | ||
"postversion": "git push && git push --tags && yarn publish . --tag $npm_package_version && git push && echo \"Successfully released version $npm_package_version!\"" | ||
@@ -22,0 +22,0 @@ }, |
@@ -223,10 +223,6 @@ [![NPM Version](https://img.shields.io/npm/v/discourse-js.svg?style=flat-square)](https://www.npmjs.com/package/discourse-js) | ||
Our preversion, version, and postversion will run, create a new tag in git and push it to our remote repository. Now we can publish again: | ||
Our preversion, version, and postversion will run, create a new tag in git and push it to our remote repository. The updated package will then be published on npm. | ||
``` | ||
npm publish | ||
``` | ||
## License | ||
MIT |
28929
556
228