mirror of
https://github.com/CyberL1/dlinux-dashboard.git
synced 2025-01-22 01:19:18 -05:00
fix(server): don't throw error on reinstall if there's no body
This commit is contained in:
parent
5c803c53e4
commit
85a8dc9ccb
@ -21,9 +21,11 @@ export default (fastify: FastifyInstance) => {
|
|||||||
Body: CreateContainerBody;
|
Body: CreateContainerBody;
|
||||||
}>,
|
}>,
|
||||||
) => {
|
) => {
|
||||||
|
if (req.body) {
|
||||||
if (!(await getImage(req.body?.image).inspect()).Id) {
|
if (!(await getImage(req.body?.image).inspect()).Id) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const oldContainer = getContainer(req.params.id);
|
const oldContainer = getContainer(req.params.id);
|
||||||
const name = (await oldContainer.inspect()).Name;
|
const name = (await oldContainer.inspect()).Name;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user