2020-06-09 02:43:32 +00:00
|
|
|
import { SubscriptionViewModel } from '../models/subscription';
|
|
|
|
|
|
|
|
angular.module('portainer.azure').factory('SubscriptionService', [
|
|
|
|
'$q',
|
|
|
|
'Subscription',
|
|
|
|
function SubscriptionServiceFactory($q, Subscription) {
|
2022-02-01 17:38:45 +00:00
|
|
|
return { subscription };
|
2020-06-09 02:43:32 +00:00
|
|
|
|
2020-07-20 21:08:20 +00:00
|
|
|
async function subscription(id) {
|
|
|
|
const subscription = await Subscription.get({ id }).$promise;
|
|
|
|
return new SubscriptionViewModel(subscription);
|
|
|
|
}
|
2020-06-09 02:43:32 +00:00
|
|
|
},
|
|
|
|
]);
|