mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-14 05:41:05 +08:00
11 lines
325 B
JavaScript
11 lines
325 B
JavaScript
|
/* eslint func-names:0 */
|
||
|
|
||
|
const DatabaseConnectionFactory = require(`${__base}/core/database-connection-factory`);
|
||
|
|
||
|
module.exports = (server) => {
|
||
|
server.decorate('request', 'getAccountDatabase', function () {
|
||
|
const account = this.auth.credentials;
|
||
|
return DatabaseConnectionFactory.forAccount(account.id);
|
||
|
});
|
||
|
}
|