discourse-js
Advanced tools
Comparing version 1.3.0 to 1.3.1
{ | ||
"name": "discourse-js", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "A client-side javascript wrapper for the discourse API.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -1,3 +0,1 @@ | ||
# Discourse-js | ||
[![NPM Version](https://img.shields.io/npm/v/discourse-js.svg?style=flat-square)](https://www.npmjs.com/package/discourse-js) | ||
@@ -140,3 +138,3 @@ | ||
.getTopic({ id }) | ||
.then(res => console.log(response)} | ||
.then(res => console.log(res)} | ||
.catch(err => console.log(err)) | ||
@@ -153,3 +151,3 @@ ``` | ||
}) | ||
.then(res => console.log(response)} | ||
.then(res => console.log(res)} | ||
.catch(err => console.log(err)) | ||
@@ -163,3 +161,3 @@ ``` | ||
.deleteTopic({ id }) | ||
.then(res => console.log(response)} // Note: delete returns nothing. | ||
.then(res => console.log(res)} // Note: delete returns nothing. | ||
.catch(err => console.log(err)) | ||
@@ -177,3 +175,3 @@ ``` | ||
.getUser({ username }) | ||
.then(res => console.log(response)} | ||
.then(res => console.log(res)} | ||
.catch(err => console.log(err)) | ||
@@ -180,0 +178,0 @@ ``` |
@@ -40,8 +40,8 @@ import { buildQueryString } from "../utils"; | ||
this.getTopicsByUsername = ({ username, params }) => { | ||
this.getTopicsByUsername = ({ username, ...inputs }) => { | ||
return new Promise((resolve, reject) => { | ||
const queryParams = { | ||
...params, | ||
const params = { | ||
api_key: discourse._API_KEY, | ||
api_username: discourse._API_USERNAME, | ||
...inputs | ||
}; | ||
@@ -51,3 +51,3 @@ | ||
.DiscourseResource({ | ||
path: buildQueryString(`topics/created-by/${username}.json`, queryParams), | ||
path: buildQueryString(`topics/created-by/${username}.json`, params), | ||
method: "GET", | ||
@@ -54,0 +54,0 @@ }) |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Non-permissive License
License(Experimental) A license not known to be considered permissive was found.
Found 1 instance in 1 package
1587032
38
2119
2
90
203
3