codecombat/app/models/Patch.coffee

13 lines
344 B
CoffeeScript
Raw Normal View History

2014-06-30 22:16:26 -04:00
CocoModel = require './CocoModel'
module.exports = class PatchModel extends CocoModel
2014-06-30 22:16:26 -04:00
@className: 'Patch'
@schema: require 'schemas/models/patch'
2014-06-30 22:16:26 -04:00
urlRoot: '/db/patch'
setStatus: (status) ->
2014-04-16 13:42:32 -04:00
PatchModel.setStatus @id, status
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}})