From b6ec112d10bd903db66b64e17ba1db35eb9d39e1 Mon Sep 17 00:00:00 2001 From: igoradamenko Date: Sun, 11 Mar 2018 20:33:09 +0300 Subject: [PATCH] add /last endpoint to api helper --- web/app/common/api.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/app/common/api.js b/web/app/common/api.js index 7fb1528d..59dc06de 100644 --- a/web/app/common/api.js +++ b/web/app/common/api.js @@ -10,6 +10,8 @@ export const getConfig = () => fetcher.get(`/config`); export const find = ({ url }) => fetcher.get(`/find?url=${url}&sort=-score&format=tree`); +export const last = ({ siteId, max }) => fetcher.get(`/last/${max}?site=${siteId}`); + export const count = ({ url, siteId }) => fetcher.get(`/count?url=${url}&site=${siteId}`); export const getComment = ({ id }) => fetcher.get(`/id/${id}?url=${url}`); @@ -67,6 +69,7 @@ export default { logOut, getConfig, find, + last, count, getComment, vote,