first import attempts

This commit is contained in:
muerwre 2018-08-29 12:05:09 +07:00
parent 8da254ff9b
commit f7e8da1f1f
9 changed files with 57 additions and 6 deletions

View file

@ -7,7 +7,7 @@ const report = console.warn;
export const checkUserToken = ({
callback, fallback, id, token
}) => (
axios.get(API.GET_GUEST, {
axios.get(API.CHECK_TOKEN, {
params: { action: 'check_token', id, token }
})
.then(result => (result && result.data))
@ -31,3 +31,13 @@ export const getMergedImage = ({ placement, callback }) => (
.then(callback)
.catch(report)
);
export const getStoredMap = ({ name, callback }) => (
axios.get(API.GET_MAP, {
params: { name, action: 'load' }
})
.then(result => (result && result.data &&result.data.data))
.then(data => ({ ...data }))
.then(callback)
.catch(report)
)