Skip to content

Instantly share code, notes, and snippets.

@swallentin
Created October 14, 2013 13:13
Show Gist options
  • Save swallentin/6975380 to your computer and use it in GitHub Desktop.
Save swallentin/6975380 to your computer and use it in GitHub Desktop.
updating broadcast.
(function () {
'use strict';
angular.module('admincms.broadcast')
.factory('broadcastEnrichmentService', function ($http, $q, $log, $resource, broadcastSettings, settings) {
var serviceEndPoint = [settings.adminApiBaseUrl, broadcastSettings.resourceEndPoints.broadcast, broadcastSettings.resourceEndPoints.enrichment].join(""),
paramsDefault = {
broadcastId: '@id',
enrichmentId: 'like-tv-se',
type: '@type'
},
actions = {
update: {
method: "PUT"
},
updateTwitter: {
method: "PUT",
params: {
type: broadcastSettings.resourceEndPoints.twitter
}
},
updateFacebook: {
method: "PUT",
params: {
type: broadcastSettings.resourceEndPoints.facebook
}
},
updateGoogle: {
method: "PUT",
params: {
type: broadcastSettings.resourceEndPoints.google
}
},
updateImages: {
method: "PUT",
params: {
type: broadcastSettings.resourceEndPoints.images
}
},
updateRoles: {
method: "PUT",
params: {
type: broadcastSettings.resourceEndPoints.roles
}
}
};
return $resource(serviceEndPoint, paramsDefault, actions);
});
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment