feat: add ability for setting current public IP in server IP update form

This commit is contained in:
Krzysztof Durek
2024-11-17 21:58:37 +01:00
parent 3015d69adc
commit 82367213ea
2 changed files with 43 additions and 2 deletions

View File

@@ -22,6 +22,7 @@ import {
findAdminById,
findServerById,
findServersByAdminId,
getPublicIpWithFallback,
haveActiveServices,
removeDeploymentsByServerId,
serverSetup,
@@ -181,4 +182,8 @@ export const serverRouter = createTRPCRouter({
throw error;
}
}),
publicIp: protectedProcedure.query(async ({ ctx }) => {
const ip = await getPublicIpWithFallback();
return ip;
}),
});