backend: auth bug fix

This commit is contained in:
muerwre 2018-11-30 15:15:52 +07:00
parent d932fcb287
commit c92f84c24f
7 changed files with 12 additions and 81 deletions

View file

@ -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));