fix(server): don't throw error on reinstall if there's no body

This commit is contained in:
CyberL1 2025-01-14 14:20:20 -05:00
parent 5c803c53e4
commit 85a8dc9ccb

View File

@ -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);