Mailspring/packages/nylas-api/decorators/connections.js

10 lines
279 B
JavaScript

/* eslint func-names:0 */
const {DatabaseConnector} = require(`nylas-core`);
module.exports = (server) => {
server.decorate('request', 'getAccountDatabase', function () {
const account = this.auth.credentials;
return DatabaseConnector.forAccount(account.id);
});
}