16bfb3fa41
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
15 lines
335 B
JavaScript
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)
|
|
};
|