portainer/app/azure/services/subscriptionService.js

15 lines
421 B
JavaScript
Raw Normal View History

import { SubscriptionViewModel } from '../models/subscription';
angular.module('portainer.azure').factory('SubscriptionService', [
'$q',
'Subscription',
function SubscriptionServiceFactory($q, Subscription) {
return { subscription };
async function subscription(id) {
const subscription = await Subscription.get({ id }).$promise;
return new SubscriptionViewModel(subscription);
}
},
]);