mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-31 15:53:33 +00:00 
			
		
		
		
	introduced now_helper for multidb capabilities
This commit is contained in:
		| @@ -6,13 +6,14 @@ const Model       = require('objection').Model; | ||||
| const User        = require('./user'); | ||||
| const AccessList  = require('./access_list'); | ||||
| const Certificate = require('./certificate'); | ||||
| const now         = require('./now_helper'); | ||||
|  | ||||
| Model.knex(db); | ||||
|  | ||||
| class ProxyHost extends Model { | ||||
| 	$beforeInsert () { | ||||
| 		this.created_on  = Model.raw('NOW()'); | ||||
| 		this.modified_on = Model.raw('NOW()'); | ||||
| 		this.created_on  = now(); | ||||
| 		this.modified_on = now(); | ||||
|  | ||||
| 		// Default for domain_names | ||||
| 		if (typeof this.domain_names === 'undefined') { | ||||
| @@ -28,7 +29,7 @@ class ProxyHost extends Model { | ||||
| 	} | ||||
|  | ||||
| 	$beforeUpdate () { | ||||
| 		this.modified_on = Model.raw('NOW()'); | ||||
| 		this.modified_on = now(); | ||||
|  | ||||
| 		// Sort domain_names | ||||
| 		if (typeof this.domain_names !== 'undefined') { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user