1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 18:13:49 +01:00
onion/js/fetchers/user_fetcher.js

21 lines
393 B
JavaScript
Raw Normal View History

'use strict';
2015-05-20 16:19:40 +02:00
import requests from '../utils/requests';
2015-06-20 16:43:18 +02:00
import apiUrls from '../constants/api_urls';
2015-05-20 16:44:45 +02:00
2015-05-20 16:19:40 +02:00
let UserFetcher = {
/**
* Fetch one user from the API.
* If no arg is supplied, load the current user
*/
fetchOne() {
return requests.get('user');
2015-06-20 16:43:18 +02:00
},
logout() {
return requests.get(apiUrls.users_logout);
2015-05-20 16:19:40 +02:00
}
};
export default UserFetcher;