1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-30 13:41:57 +02:00
onion/js/fetchers/user_fetcher.js
2015-06-20 16:43:18 +02:00

21 lines
393 B
JavaScript

'use strict';
import requests from '../utils/requests';
import apiUrls from '../constants/api_urls';
let UserFetcher = {
/**
* Fetch one user from the API.
* If no arg is supplied, load the current user
*/
fetchOne() {
return requests.get('user');
},
logout() {
return requests.get(apiUrls.users_logout);
}
};
export default UserFetcher;