mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-12-15 20:13:25 +00:00
added postgresql support for broken functions
This commit is contained in:
@@ -409,6 +409,7 @@ const internalProxyHost = {
|
||||
* @returns {Promise}
|
||||
*/
|
||||
getAll: (access, expand, search_query) => {
|
||||
|
||||
return access.can('proxy_hosts:list')
|
||||
.then((access_data) => {
|
||||
let query = proxyHostModel
|
||||
@@ -416,16 +417,17 @@ const internalProxyHost = {
|
||||
.where('is_deleted', 0)
|
||||
.groupBy('id')
|
||||
.allowGraph('[owner,access_list,certificate]')
|
||||
.orderBy('domain_names', 'ASC');
|
||||
.orderByRaw('CAST(domain_names AS VARCHAR(65535) ) ASC')
|
||||
;
|
||||
|
||||
if (access_data.permission_visibility !== 'all') {
|
||||
query.andWhere('owner_user_id', access.token.getUserId(1));
|
||||
}
|
||||
|
||||
// Query is used for searching
|
||||
if (typeof search_query === 'string') {
|
||||
if (typeof search_query === 'string' && search_query.length > 0) {
|
||||
query.where(function () {
|
||||
this.where('domain_names', 'like', '%' + search_query + '%');
|
||||
this.whereRaw('CAST(domain_names AS VARCHAR(65535) ) like ? ESCAPE \'\'', '%'+search_query + '%');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -436,6 +438,7 @@ const internalProxyHost = {
|
||||
return query.then(utils.omitRows(omissions()));
|
||||
})
|
||||
.then((rows) => {
|
||||
|
||||
if (typeof expand !== 'undefined' && expand !== null && expand.indexOf('certificate') !== -1) {
|
||||
return internalHost.cleanAllRowsCertificateMeta(rows);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user