refactor: add latestVersion information to update data

This commit is contained in:
UndefinedPony
2024-12-20 18:26:54 +01:00
parent c8514e3a1b
commit 4565b3d7a2
4 changed files with 39 additions and 18 deletions

View File

@@ -45,7 +45,7 @@ import {
stopService,
stopServiceRemote,
updateAdmin,
checkIsUpdateAvailable,
getUpdateData,
updateLetsEncryptEmail,
updateServerById,
updateServerTraefik,
@@ -343,12 +343,12 @@ export const settingsRouter = createTRPCRouter({
writeConfig("middlewares", input.traefikConfig);
return true;
}),
checkForUpdate: adminProcedure.mutation(async () => {
getUpdateData: adminProcedure.mutation(async () => {
if (IS_CLOUD) {
return true;
return { latestVersion: null, updateAvailable: false };
}
return await checkIsUpdateAvailable();
return await getUpdateData();
}),
updateServer: adminProcedure.mutation(async () => {
if (IS_CLOUD) {