mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
backend: auth bug fix
This commit is contained in:
parent
d932fcb287
commit
c92f84c24f
7 changed files with 12 additions and 81 deletions
|
@ -2,22 +2,12 @@ import axios from 'axios/index';
|
|||
|
||||
import { API } from '$constants/api';
|
||||
|
||||
const report = console.warn;
|
||||
|
||||
export const checkUserToken = ({ id, token }) => axios.get(API.CHECK_TOKEN, {
|
||||
params: { id, token }
|
||||
}).then(result => (result && result.data && { ...result.data, id, token }));
|
||||
|
||||
export const getGuestToken = () => axios.get(API.GET_GUEST).then(result => (result && result.data));
|
||||
|
||||
export const getMergedImage = ({ placement, callback }) => (
|
||||
axios.get(API.COMPOSE, {
|
||||
params: { placement }
|
||||
})
|
||||
.then(callback)
|
||||
.catch(report)
|
||||
);
|
||||
|
||||
export const getStoredMap = ({ name }) => axios.get(API.GET_MAP, {
|
||||
params: { name }
|
||||
}).then(result => (result && result.data));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue