1234567891011121314151617181920212223 |
- var AppState = require('../app_state');
- var Backbone = require('backbone');
- var Node = Backbone.Model.extend({ //eslint-disable-line no-undef
- idAttribute: 'name',
- constructor: function Node() {
- Backbone.Model.prototype.constructor.apply(this, arguments);
- },
- urlRoot: function() {
- return AppState.apiPath('/nodes');
- },
- tombstoneTopic: function(topic) {
- return this.destroy({
- 'data': JSON.stringify({'topic': topic}),
- 'dataType': 'text'
- });
- }
- });
- module.exports = Node;
|