mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
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)
|
|
};
|