Skip to content

Commit

Permalink
add message update service
Browse files Browse the repository at this point in the history
  • Loading branch information
samsep committed Oct 14, 2015
1 parent 6fd8fb4 commit 62138e1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/scripts/message-update-api.service.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use strict'

transformResponse = (response) ->
parsed = JSON.parse response

parsed?.result?.content || []

srv = ($resource, API_URL) ->
url = API_URL + '/v3/inboxes/:workId/messages/:messageId'

params =
workId: '@workId'
messageId: '@messageId'

methods =
post:
method: 'POST'

patch:
method: 'PATCH'

put:
method: 'PUT'

$resource url, {}, methods

srv.$inject = ['$resource', 'API_URL']

angular.module('appirio-tech-ng-api-services').factory 'MessageUpdateAPIService', srv

0 comments on commit 62138e1

Please sign in to comment.