Ghost/core/server/models/snippet.js
Kevin Ansfield 16bfb3fa41 Added basic CRUD admin API for snippets
no issue

- standard browse/read/add/edit/destroy API endpoints for snippets resource
- updates `@tryghost/admin-api-schema` dependency to version that includes snippet definition and schemas
2020-10-16 18:02:58 +01:00

15 lines
335 B
JavaScript

const ghostBookshelf = require('./base');
const Snippet = ghostBookshelf.Model.extend({
tableName: 'snippets'
});
const Snippets = ghostBookshelf.Collection.extend({
model: Snippet
});
module.exports = {
Snippet: ghostBookshelf.model('Snippet', Snippet),
Snippets: ghostBookshelf.collection('Snippets', Snippets)
};