mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-20 01:03:23 +03:00
d90df55b75
closes #367 closes #368 - Adds Tag model with a many-to-many relationship with Post - Adds Tag API to retrieve all previously used Tags (needed for suggestions) - Allows setting and retrieval of Tags for a post through the Post's existing API endpoints. - Hooks up the editor's tag suggestion box to the Ghost install's previously used tags - Tidies the client code for adding tags, and encapsulates the functionality into a Backbone view
23 lines
717 B
JavaScript
23 lines
717 B
JavaScript
var migrations = require('../data/migration');
|
|
|
|
module.exports = {
|
|
Post: require('./post').Post,
|
|
User: require('./user').User,
|
|
Role: require('./role').Role,
|
|
Permission: require('./permission').Permission,
|
|
Settings: require('./settings').Settings,
|
|
Tag: require('./tag').Tag,
|
|
init: function () {
|
|
return migrations.init();
|
|
},
|
|
reset: function () {
|
|
return migrations.reset().then(function () {
|
|
return migrations.init();
|
|
});
|
|
},
|
|
isPost: function (jsonData) {
|
|
return jsonData.hasOwnProperty("content") && jsonData.hasOwnProperty("content_raw")
|
|
&& jsonData.hasOwnProperty("title") && jsonData.hasOwnProperty("slug");
|
|
}
|
|
};
|