mirror of
https://github.com/ershisan99/coolify.git
synced 2026-02-01 12:34:39 +00:00
fixes
This commit is contained in:
@@ -32,12 +32,20 @@
|
||||
import { get, post } from '$lib/api';
|
||||
import { t } from '$lib/translations';
|
||||
import { errorNotification, supportedServiceTypesAndVersions } from '$lib/common';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
const { id } = $page.params;
|
||||
const from = $page.url.searchParams.get('from');
|
||||
let recommendedVersion = supportedServiceTypesAndVersions.find(
|
||||
({ name }) => name === type
|
||||
)?.recommendedVersion;
|
||||
|
||||
onMount(async () => {
|
||||
if (versions.length === 1) {
|
||||
await handleSubmit(versions[0]);
|
||||
}
|
||||
});
|
||||
|
||||
async function handleSubmit(version: any) {
|
||||
try {
|
||||
await post(`/services/${id}/configuration/version`, { version });
|
||||
|
||||
Reference in New Issue
Block a user