1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-30 21:52:08 +02:00
onion/js/fetchers/application_fetcher.js

22 lines
449 B
JavaScript
Raw Normal View History

2015-06-22 17:33:25 +02:00
'use strict';
import request from '../utils/request';
2015-06-22 17:33:25 +02:00
let ApplicationFetcher = {
/**
* Fetch the registered applications of a user from the API.
*/
fetch() {
return request('applications');
2015-06-22 17:33:25 +02:00
},
2015-06-22 17:33:25 +02:00
refreshToken(applicationName) {
return request('application_token_refresh', {
method: 'POST',
jsonBody: { name: applicationName }
});
2015-06-22 17:33:25 +02:00
}
};
export default ApplicationFetcher;