mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-04-25 16:50:52 +00:00
- Changes for objection migration - Moved common access template code to an include - Fixed access rules configuration generation
13 lines
318 B
JavaScript
13 lines
318 B
JavaScript
const db = require('../db');
|
|
const config = require('config');
|
|
const Model = require('objection').Model;
|
|
|
|
Model.knex(db);
|
|
|
|
module.exports = function () {
|
|
if (config.database.knex && config.database.knex.client === 'sqlite3') {
|
|
return Model.raw("datetime('now','localtime')");
|
|
}
|
|
return Model.raw('NOW()');
|
|
};
|