api.user → api.getUser

This commit is contained in:
igoradamenko
2018-02-02 21:15:21 +02:00
parent 3012c27f90
commit 00a17ad15f
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ import fetcher from './fetcher'
export const find = ({ url }) => fetcher.get(`/find?url=${url}&sort=time&format=tree`);
export const user = () => fetcher.get('/user');
export const getUser = () => fetcher.get('/user');
export const send = ({ text }) => fetcher.post('/comment', { text, locator: { site: siteId, url } });
@@ -14,5 +14,5 @@ export default {
find,
send,
vote,
user,
getUser,
};
+1 -1
View File
@@ -15,7 +15,7 @@ export default class Root extends Component {
}
componentDidMount() {
api.user()
api.getUser()
.then(data => store.set({ user: data }))
.catch(() => store.set({ user: {} }))
.finally(() => {