Kaydet (Commit) 166d8115 authored tarafından Hakkı Dizdar's avatar Hakkı Dizdar

Park Imajlarının yüklenip yüklenmediğini kontrol edecek bir endpoint yapıldı

üst 44b44003
......@@ -32,17 +32,23 @@ app.get("/containers", (_, res) => {
});
});
app.get("/images", (_, res) => {
docker.listImages(function (_, images) {
res.send(
images.filter(
(i) =>
i.RepoTags[0].startsWith("nyxteam/oyunparki-small") ||
i.RepoTags[0].startsWith("nyxteam/oyunparki-full")
).length !== 0
);
});
});
app.post(
"/images",
checkSchema({
image: {
in: ["nyxteam/oyunparki-full", "nyxteam/oyunparki-small"],
errorMessage: "Yanlış versiyon seçildi!",
},
}),
(_, res) => {
docker.listImages(function (_, images) {
res.send(
images.filter((i) => i.RepoTags[0].startsWith(req.body.image))
.length !== 0
);
});
}
);
app.post(
"/create",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment