mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: add Is cloud flag
This commit is contained in:
parent
fbda00f059
commit
9591fbff08
@ -139,12 +139,16 @@ export const serverRouter = createTRPCRouter({
|
||||
const currentServer = await findServerById(input.serverId);
|
||||
await removeDeploymentsByServerId(currentServer);
|
||||
await deleteServer(input.serverId);
|
||||
|
||||
if (IS_CLOUD) {
|
||||
const admin = await findAdminById(ctx.user.adminId);
|
||||
|
||||
await updateServersBasedOnQuantity(
|
||||
admin.adminId,
|
||||
admin.serversQuantity,
|
||||
);
|
||||
}
|
||||
|
||||
return currentServer;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
|
Loading…
Reference in New Issue
Block a user