1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 17:45:10 +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-08-07 15:08:02 +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() {
2015-08-07 15:08:02 +02:00
return requests.get(ApiUrls.users_logout);
2015-05-20 16:19:40 +02:00
}
};
export default UserFetcher;