mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-06-19 02:26:27 +00:00
Improvements for certificates table, adds expansion object to certificates
This commit is contained in:
@ -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