fe-drone-ci/src/api/login.js

30 lines
436 B
JavaScript
Raw Normal View History

2017-05-15 09:56:45 +00:00
import fetch from 'utils/fetch';
2017-04-24 06:15:42 +00:00
export function loginByEmail(email, password) {
const data = {
email,
password
};
return fetch({
url: '/login/loginbyemail',
method: 'post',
2017-05-10 07:47:53 +00:00
data
2017-04-24 06:15:42 +00:00
});
}
export function logout() {
return fetch({
url: '/login/logout',
method: 'post'
});
}
export function getInfo(token) {
return fetch({
url: '/user/info',
method: 'get',
params: { token }
});
}