mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
saving with title and buttons and forcing
This commit is contained in:
parent
fc1bac528a
commit
1ecc2d2a92
8 changed files with 98 additions and 21 deletions
|
@ -31,10 +31,10 @@ export const getStoredMap = ({ name }) => axios.get(API.GET_MAP, {
|
|||
name,
|
||||
action: 'load'
|
||||
}
|
||||
}).then(result => (result && result.data && result.data.data && result.data.owner && { ...result.data.data, owner: result.data.owner }));
|
||||
}).then(result => (result && result.data && result.data.data && { ...result.data.data, owner: (result.data.owner || null) }));
|
||||
|
||||
export const postMap = ({
|
||||
title, address, route, stickers, id, token
|
||||
title, address, route, stickers, id, token, force,
|
||||
}) => axios.post(API.POST_MAP, {
|
||||
action: 'store',
|
||||
title,
|
||||
|
@ -43,4 +43,5 @@ export const postMap = ({
|
|||
stickers,
|
||||
id,
|
||||
token,
|
||||
}).then(result => (result && result.data && result.data.data && result.data.owner && { ...result.data.data, owner: result.data.owner }));
|
||||
force,
|
||||
}).then(result => (result && result.data && result.data));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue