add send api endpoint for posting comments
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
import { siteId, url } from './settings';
|
||||
|
||||
import fetcher from './fetcher'
|
||||
|
||||
export const find = ({ url }) => fetcher.get(`/find?url=${url}&sort=time&format=tree`);
|
||||
|
||||
export const vote = ({ id, url, value }) => fetcher.get(`/vote/${id}?url=${url}&vote=${value}`);
|
||||
export const send = ({ text }) => fetcher.post('/comment', { text, locator: { site: siteId, url } });
|
||||
|
||||
export const vote = ({ id, url, value }) => fetcher.put(`/vote/${id}?url=${url}&vote=${value}`);
|
||||
|
||||
export default {
|
||||
find,
|
||||
send,
|
||||
vote,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user