mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-12-01 10:21:19 +01:00
Improvements for certificates table, adds expansion object to certificates
This commit is contained in:
1 parent
6c76c041c4
commit
456c59c746
9 files changed
+95
-22
No files matched your search
@@ -102,7 +102,7 @@ func Update(certificate *Model) error {
|
||||
}
|
||||
|
||||
// List will return a list of certificates
|
||||
func List(pageInfo model.PageInfo, filters []model.Filter) (ListResponse, error) {
|
||||
func List(pageInfo model.PageInfo, filters []model.Filter, expand []string) (ListResponse, error) {
|
||||
var result ListResponse
|
||||
var exampleModel Model
|
||||
|
||||
@@ -135,6 +135,15 @@ func List(pageInfo model.PageInfo, filters []model.Filter) (ListResponse, error)
|
||||
return result, err
|
||||
}
|
||||
|
||||
if expand != nil {
|
||||
for idx := range items {
|
||||
expandErr := items[idx].Expand(expand)
|
||||
if expandErr != nil {
|
||||
logger.Error("CertificatesExpansionError", expandErr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
result = ListResponse{
|
||||
Items: items,
|
||||
Total: totalRows,
|
||||
|
||||
Reference in new issue
Block a user