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