2015-06-22 17:33:25 +02:00
|
|
|
'use strict';
|
|
|
|
|
2016-06-14 16:53:18 +02:00
|
|
|
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() {
|
2016-06-14 16:53:18 +02:00
|
|
|
return request('applications');
|
2015-06-22 17:33:25 +02:00
|
|
|
},
|
2016-06-14 16:53:18 +02:00
|
|
|
|
2015-06-22 17:33:25 +02:00
|
|
|
refreshToken(applicationName) {
|
2016-06-14 16:53:18 +02:00
|
|
|
return request('application_token_refresh', {
|
|
|
|
method: 'POST',
|
|
|
|
jsonBody: { name: applicationName }
|
|
|
|
});
|
2015-06-22 17:33:25 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ApplicationFetcher;
|