mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
18 lines
408 B
JavaScript
18 lines
408 B
JavaScript
|
'use strict';
|
||
|
|
||
|
import requests from '../utils/requests';
|
||
|
|
||
|
let ApplicationFetcher = {
|
||
|
/**
|
||
|
* Fetch the registered applications of a user from the API.
|
||
|
*/
|
||
|
fetch() {
|
||
|
return requests.get('applications');
|
||
|
},
|
||
|
refreshToken(applicationName) {
|
||
|
return requests.post('application_token_refresh', { body: {'name': applicationName}});
|
||
|
}
|
||
|
};
|
||
|
|
||
|
export default ApplicationFetcher;
|