codecombat/app/models/Patch.coffee
2014-04-16 10:42:32 -07:00

11 lines
No EOL
307 B
CoffeeScript

CocoModel = require('./CocoModel')
module.exports = class PatchModel extends CocoModel
@className: "Patch"
urlRoot: "/db/patch"
setStatus: (status) ->
PatchModel.setStatus @id, status
@setStatus: (id, status) ->
$.ajax("/db/patch/#{id}/status", {type:"PUT", data: {status:status}})