mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-30 23:33:34 +00:00 
			
		
		
		
	Small tweaks
This commit is contained in:
		| @@ -1,10 +0,0 @@ | |||||||
| package doc |  | ||||||
|  |  | ||||||
| import "embed" |  | ||||||
|  |  | ||||||
| // SwaggerFiles contain all the files used for swagger schema generation |  | ||||||
| // |  | ||||||
| //go:embed api.swagger.json |  | ||||||
| //go:embed components |  | ||||||
| //go:embed paths |  | ||||||
| var SwaggerFiles embed.FS |  | ||||||
| @@ -85,21 +85,6 @@ func getQueryVarInt(r *http.Request, varName string, required bool, defaultValue | |||||||
| 	return varInt, nil | 	return varInt, nil | ||||||
| } | } | ||||||
|  |  | ||||||
| /* |  | ||||||
| func getQueryVarBool(r *http.Request, varName string, required bool, defaultValue bool) (bool, error) { |  | ||||||
| 	queryValues := r.URL.Query() |  | ||||||
| 	varValue := queryValues.Get(varName) |  | ||||||
|  |  | ||||||
| 	if varValue == "" && required { |  | ||||||
| 		return false, eris.Errorf("%v was not supplied in the request", varName) |  | ||||||
| 	} else if varValue == "" { |  | ||||||
| 		return defaultValue, nil |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	return varValue == "true" || varValue == "1" || varValue == "on", nil |  | ||||||
| } |  | ||||||
| */ |  | ||||||
|  |  | ||||||
| func getURLParamInt(r *http.Request, varName string) (uint, error) { | func getURLParamInt(r *http.Request, varName string) (uint, error) { | ||||||
| 	var defaultValue uint = 0 | 	var defaultValue uint = 0 | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,11 +2,12 @@ package entity | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"npm/internal/logger" |  | ||||||
| 	"npm/internal/util" |  | ||||||
| 	"reflect" | 	"reflect" | ||||||
| 	"strings" | 	"strings" | ||||||
|  |  | ||||||
|  | 	"npm/internal/logger" | ||||||
|  | 	"npm/internal/util" | ||||||
|  |  | ||||||
| 	"github.com/rotisserie/eris" | 	"github.com/rotisserie/eris" | ||||||
| ) | ) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -15,7 +15,7 @@ type Sort struct { | |||||||
| 	Direction string `json:"direction"` | 	Direction string `json:"direction"` | ||||||
| } | } | ||||||
|  |  | ||||||
| // TableName overrides the table name used by gorm | // GetSort ... | ||||||
| func (p *PageInfo) GetSort(def Sort) []Sort { | func (p *PageInfo) GetSort(def Sort) []Sort { | ||||||
| 	if p.Sort == nil { | 	if p.Sort == nil { | ||||||
| 		return []Sort{def} | 		return []Sort{def} | ||||||
|   | |||||||
| @@ -3,10 +3,11 @@ package util | |||||||
| import ( | import ( | ||||||
| 	"bytes" | 	"bytes" | ||||||
| 	"encoding/json" | 	"encoding/json" | ||||||
| 	"npm/internal/logger" |  | ||||||
| 	"regexp" | 	"regexp" | ||||||
| 	"strings" | 	"strings" | ||||||
| 	"unicode" | 	"unicode" | ||||||
|  |  | ||||||
|  | 	"npm/internal/logger" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| // CleanupWhitespace will trim up and remove extra lines and stuff | // CleanupWhitespace will trim up and remove extra lines and stuff | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user