Ghost/core/server/models/client.js
Sebastian Gierlinger 52e35a282b Add table columns for OAuth
closes #4174
- added trusted domains
- removed unique constraint from secret
2015-09-02 13:39:22 +01:00

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)
};