"use strict"; angular.module('app.service') .factory('adminTicketBridge', ['BaseTicketBridge', function (BaseTicketBridge) { var AdminTicketBridge = function (options) { BaseTicketBridge.call(this, options); this.controller = 'object'; }; AdminTicketBridge.prototype = _.create(BaseTicketBridge.prototype); AdminTicketBridge.prototype.constructor = AdminTicketBridge; AdminTicketBridge.prototype.imageList = function (ticketId) { return this.post('image-list', {id: ticketId}); }; AdminTicketBridge.prototype.imageReorder = function (ticketId, imageIds) { return this.post('image-reorder', {id: ticketId, imageIds: imageIds}); }; /** * Delete uploaded image linked to tag * @param {Number} id * @param {Number} imageId * @return {promise} */ AdminTicketBridge.prototype.imageDelete = function (id, imageId) { return this.post('image-delete', {id: id, imageId: imageId}); }; AdminTicketBridge.prototype.imageSave = function (id, data) { return this.post('image-save', {id: id, data: data}); }; return new AdminTicketBridge(); }]);