fix: update version
This commit is contained in:
parent
4cf907c572
commit
6c32f3b130
@ -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) {}
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user