diff --git a/apps/api/src/routes/api/v1/services/index.ts b/apps/api/src/routes/api/v1/services/index.ts index b659484a2..88e9e5eec 100644 --- a/apps/api/src/routes/api/v1/services/index.ts +++ b/apps/api/src/routes/api/v1/services/index.ts @@ -71,7 +71,7 @@ const root: FastifyPluginAsync = async (fastify): Promise => { fastify.get('/:id/logs/:containerId', async (request) => await getServiceLogs(request)); fastify.post('/:id/start', async (request) => await startService(request)); - fastify.post('/:id/:type/stop', async (request) => await stopService(request)); + fastify.post('/:id/stop', async (request) => await stopService(request)); fastify.post('/:id/:type/settings', async (request, reply) => await setSettingsService(request, reply)); fastify.post('/:id/plausibleanalytics/activate', async (request, reply) => await activatePlausibleUsers(request, reply)); diff --git a/apps/ui/src/routes/services/[id]/__layout.svelte b/apps/ui/src/routes/services/[id]/__layout.svelte index 6c4ed5620..6696e40d0 100644 --- a/apps/ui/src/routes/services/[id]/__layout.svelte +++ b/apps/ui/src/routes/services/[id]/__layout.svelte @@ -122,7 +122,13 @@ $status.service.initialLoading = true; $status.service.loading = true; try { - await post(`/services/${service.id}/${service.type}/stop`, {}); + await post(`/services/${service.id}/stop`, {}); + if (service.type.startsWith('wordpress')) { + await post(`/services/${id}/wordpress/ftp`, { + ftpEnabled: false + }); + window.location.reload() + } } catch (error) { return errorNotification(error); } finally {