mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 19:52:01 +03:00
6e48275160
fixes #3275, fixes #3290, ref #3086, ref #3084 - Ensure that we use the current logged in user and not just user 1 when - removing hard coded user: 1 except where absolutely necessary - passing context, rather than user to models - base model has a new function to determine what id to use for created_by etc
18 lines
337 B
JavaScript
18 lines
337 B
JavaScript
var ghostBookshelf = require('./base'),
|
|
|
|
Client,
|
|
Clients;
|
|
|
|
|
|
Client = ghostBookshelf.Model.extend({
|
|
tableName: 'clients'
|
|
});
|
|
|
|
Clients = ghostBookshelf.Collection.extend({
|
|
model: Client
|
|
});
|
|
|
|
module.exports = {
|
|
Client: ghostBookshelf.model('Client', Client),
|
|
Clients: ghostBookshelf.collection('Clients', Clients)
|
|
}; |