mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-14 18:52:05 +03:00
52e35a282b
closes #4174 - added trusted domains - removed unique constraint from secret
21 lines
457 B
JavaScript
21 lines
457 B
JavaScript
var ghostBookshelf = require('./base'),
|
|
|
|
Client,
|
|
Clients;
|
|
|
|
Client = ghostBookshelf.Model.extend({
|
|
tableName: 'clients',
|
|
trustedDomains: function trustedDomains() {
|
|
return this.hasMany('ClientTrustedDomain', 'client_id');
|
|
}
|
|
});
|
|
|
|
Clients = ghostBookshelf.Collection.extend({
|
|
model: Client
|
|
});
|
|
|
|
module.exports = {
|
|
Client: ghostBookshelf.model('Client', Client),
|
|
Clients: ghostBookshelf.collection('Clients', Clients)
|
|
};
|