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) => { ...@@ -32,17 +32,23 @@ app.get("/containers", (_, res) => {
}); });
}); });
app.get("/images", (_, res) => { app.post(
docker.listImages(function (_, images) { "/images",
res.send( checkSchema({
images.filter( image: {
(i) => in: ["nyxteam/oyunparki-full", "nyxteam/oyunparki-small"],
i.RepoTags[0].startsWith("nyxteam/oyunparki-small") || errorMessage: "Yanlış versiyon seçildi!",
i.RepoTags[0].startsWith("nyxteam/oyunparki-full") },
).length !== 0 }),
); (_, res) => {
}); docker.listImages(function (_, images) {
}); res.send(
images.filter((i) => i.RepoTags[0].startsWith(req.body.image))
.length !== 0
);
});
}
);
app.post( app.post(
"/create", "/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