refactor: rename action, move pull to updateServer

This commit is contained in:
UndefinedPony
2024-12-20 17:27:51 +01:00
parent e6bc40e7fe
commit 2804748118

View File

@@ -45,6 +45,7 @@ import {
stopService,
stopServiceRemote,
updateAdmin,
checkIsUpdateAvailable,
updateLetsEncryptEmail,
updateServerById,
updateServerTraefik,
@@ -342,17 +343,20 @@ export const settingsRouter = createTRPCRouter({
writeConfig("middlewares", input.traefikConfig);
return true;
}),
checkAndUpdateImage: adminProcedure.mutation(async () => {
checkForUpdate: adminProcedure.mutation(async () => {
if (IS_CLOUD) {
return true;
}
return await pullLatestRelease();
return await checkIsUpdateAvailable();
}),
updateServer: adminProcedure.mutation(async () => {
if (IS_CLOUD) {
return true;
}
await pullLatestRelease();
await spawnAsync("docker", [
"service",
"update",
@@ -361,6 +365,7 @@ export const settingsRouter = createTRPCRouter({
getDokployImage(),
"dokploy",
]);
return true;
}),