add possibility to get last 10 user comments

This commit is contained in:
igoradamenko
2018-06-18 23:28:29 +03:00
parent 1c0e1a2b07
commit 5dcd7aea4e
14 changed files with 165 additions and 30 deletions
+3
View File
@@ -22,6 +22,8 @@ export const counts = ({ urls, siteId }) => fetcher.post({
export const getComment = ({ id }) => fetcher.get(`/id/${id}?url=${url}`);
export const getUserComments = ({ user, limit }) => fetcher.get(`/comments?user=${user}&limit=${limit}`)
export const vote = ({ id, url, value }) => fetcher.put({
url: `/vote/${id}?url=${url}&vote=${value}`,
withCredentials: true,
@@ -109,6 +111,7 @@ export default {
last,
counts,
getComment,
getUserComments,
vote,
send,
edit,