From 85a8dc9ccb9e6de94cefdb875dbbeba73d9c3538 Mon Sep 17 00:00:00 2001 From: CyberL1 Date: Tue, 14 Jan 2025 14:20:20 -0500 Subject: [PATCH] fix(server): don't throw error on reinstall if there's no body --- src/routes/containers/_id/reinstall.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/routes/containers/_id/reinstall.ts b/src/routes/containers/_id/reinstall.ts index 0f5436d..34ab8b3 100644 --- a/src/routes/containers/_id/reinstall.ts +++ b/src/routes/containers/_id/reinstall.ts @@ -21,8 +21,10 @@ export default (fastify: FastifyInstance) => { Body: CreateContainerBody; }>, ) => { - if (!(await getImage(req.body?.image).inspect()).Id) { - return; + if (req.body) { + if (!(await getImage(req.body?.image).inspect()).Id) { + return; + } } const oldContainer = getContainer(req.params.id);