fix: update version

This commit is contained in:
Andras Bacsai 2022-02-27 12:22:04 +01:00
parent 4cf907c572
commit 6c32f3b130
2 changed files with 2 additions and 4 deletions

View File

@ -62,7 +62,7 @@
if (overrideVersion || data?.isUpdateAvailable) {
latestVersion = overrideVersion || data.latestVersion;
isUpdateAvailable = overrideVersion ? true : data?.isUpdateAvailable;
await post(`/update.json`, { type: 'pull', latestVersion, overrideVersion });
await post(`/update.json`, { type: 'pull', latestVersion });
}
} catch (error) {}
}

View File

@ -26,12 +26,10 @@ export const get: RequestHandler = async () => {
};
export const post: RequestHandler = async (event) => {
const { type, latestVersion, overrideVersion = false } = await event.request.json();
const { type, latestVersion } = await event.request.json();
if (type === 'pull') {
try {
if (!dev) {
if (!overrideVersion)
await asyncExecShell(`docker image inspect coollabsio/coolify:${latestVersion}`);
await asyncExecShell(`docker pull coollabsio/coolify:${latestVersion}`);
return {
status: 200,