@6degrees/f6snypi
Advanced tools
Comparing version 1.0.2 to 1.0.3
module.exports = (axios) => () => ({ | ||
async getLatestComments() { | ||
try { | ||
return await axios.get("/globalcalls/getLatestComments").then(response => response.data);; | ||
return await axios.get("/globalcalls/getLatestComments").then(response => response.data); | ||
} catch (error) { | ||
@@ -12,3 +12,3 @@ throw new Error(error); | ||
try { | ||
return await axios.get(`/comments/jokes:${id}?_sort=id:desc`).then(response => response.data);; | ||
return await axios.get(`/comments/jokes:${id}?_sort=id:desc`).then(response => response.data); | ||
} catch (error) { | ||
@@ -21,3 +21,3 @@ throw new Error(error); | ||
try { | ||
return await axios.get(`/comments/moderation/all`).then(response => response.data);; | ||
return await axios.get(`/comments/moderation/all`).then(response => response.data); | ||
} catch (error) { | ||
@@ -30,3 +30,3 @@ throw new Error(error); | ||
try { | ||
return await axios.post(`/comments/jokes:${joke_id}`, comment).then(response => response.data);; | ||
return await axios.post(`/comments/jokes:${joke_id}`, comment).then(response => response.data); | ||
} catch (error) { | ||
@@ -39,3 +39,3 @@ throw new Error(error); | ||
try { | ||
return await axios.get(encodeURI(`/users/${username}/comments`)).then(response => response.data);; | ||
return await axios.get(encodeURI(`/users/${username}/comments`)).then(response => response.data); | ||
} catch (error) { | ||
@@ -42,0 +42,0 @@ throw new Error(error); |
{ | ||
"name": "@6degrees/f6snypi", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "An API wrapper for https://api.f6sny.com for NPM", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
11747