2014-06-30 22:16:26 -04:00
|
|
|
CocoModel = require './CocoModel'
|
2014-04-10 16:09:44 -04:00
|
|
|
|
|
|
|
module.exports = class PatchModel extends CocoModel
|
2014-06-30 22:16:26 -04:00
|
|
|
@className: 'Patch'
|
2014-04-22 14:11:08 -04:00
|
|
|
@schema: require 'schemas/models/patch'
|
2014-06-30 22:16:26 -04:00
|
|
|
urlRoot: '/db/patch'
|
2014-04-22 14:11:08 -04:00
|
|
|
|
2016-09-07 19:15:54 -04:00
|
|
|
setStatus: (status, options={}) ->
|
|
|
|
options.url = "/db/patch/#{@id}/status"
|
|
|
|
options.type = 'PUT'
|
|
|
|
@save({status}, options)
|
2014-04-22 14:11:08 -04:00
|
|
|
|
2014-04-16 13:42:32 -04:00
|
|
|
@setStatus: (id, status) ->
|
2014-06-30 22:16:26 -04:00
|
|
|
$.ajax("/db/patch/#{id}/status", {type: 'PUT', data: {status: status}})
|