refactor information widgets

This commit is contained in:
Ben Phelps committed 2022-08-27 00:55:13 +03:00
1 parent 1124f55361
commit b61ec9836e
10 files changed
+208 -120

No files matched your search

+4 -2
View File
@@ -14,7 +14,9 @@ export default async function handler(req, res) {
try {
const docker = new Docker(await getDockerArguments(containerServer));
const containers = await docker.listContainers();
const containers = await docker.listContainers({
all: true,
});
// bad docker connections can result in a <Buffer ...> object?
// in any case, this ensures the result is the expected array
@@ -30,7 +32,7 @@ export default async function handler(req, res) {
const containerExists = containerNames.includes(containerName);
if (!containerExists) {
return res.status(404).send({
return res.status(200).send({
error: "not found",
});
}