Ghost/core/admin/assets/js/models/post.js
ErisDS 185eee2a6b Implementing backbone for the blog / content view
closes #64 - adds a full example of using backbone on the frontend
remembered to squash this one!
2013-05-31 06:58:20 +01:00

17 lines
389 B
JavaScript

/*global window, document, Ghost, $, Backbone, _ */
(function () {
"use strict";
Ghost.Model.Post = Backbone.Model.extend({
urlRoot: '/api/v0.1/posts/',
defaults: {
status: 'draft'
}
});
Ghost.Collection.Posts = Backbone.Collection.extend({
url: Ghost.settings.baseURL + '/posts',
model: Ghost.Model.Post
});
}());