mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
first import attempts
This commit is contained in:
parent
8da254ff9b
commit
f7e8da1f1f
9 changed files with 57 additions and 6 deletions
|
@ -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)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue