1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 13:55:21 +02:00

chore(edgejobs): clean up EE-4850 (#8259)

This commit is contained in:
andres-portainer 2023-01-03 13:12:12 -03:00 committed by GitHub
parent 2fc518f221
commit 3d28a6f877
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 21 deletions

View file

@ -40,15 +40,12 @@ func (handler *Handler) edgeJobInspect(w http.ResponseWriter, r *http.Request) *
return httperror.InternalServerError("Unable to find an Edge job with the specified identifier inside the database", err)
}
endpointIDs := []portainer.EndpointID{}
for endpointID := range edgeJob.Endpoints {
endpointIDs = append(endpointIDs, endpointID)
responseObj := edgeJobInspectResponse{
EdgeJob: edgeJob,
}
responseObj := edgeJobInspectResponse{
EdgeJob: edgeJob,
Endpoints: endpointIDs,
for endpointID := range edgeJob.Endpoints {
responseObj.Endpoints = append(responseObj.Endpoints, endpointID)
}
return response.JSON(w, responseObj)