mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
22 lines
449 B
JavaScript
22 lines
449 B
JavaScript
'use strict';
|
|
|
|
import request from '../utils/request';
|
|
|
|
let ApplicationFetcher = {
|
|
/**
|
|
* Fetch the registered applications of a user from the API.
|
|
*/
|
|
fetch() {
|
|
return request('applications');
|
|
},
|
|
|
|
refreshToken(applicationName) {
|
|
return request('application_token_refresh', {
|
|
method: 'POST',
|
|
jsonBody: { name: applicationName }
|
|
});
|
|
}
|
|
};
|
|
|
|
export default ApplicationFetcher;
|