Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Commit 83b685c

Browse files
committed
fix: merge existing server limits before updating build to avoid missing required fields
1 parent ea8b95f commit 83b685c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

services/pyrodactyl.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,13 @@ export async function reinstallPteroServer(serverId) {
256256
}
257257

258258
export async function updatePteroServerBuild(serverId, limits) {
259+
// Fetch current server to get existing limits for fields we don't override
260+
const server = await getServerById(serverId);
261+
const currentLimits = server.limits || {};
262+
const mergedLimits = { ...currentLimits, ...limits };
259263
await pteroFetch(`/servers/${serverId}/build`, {
260264
method: 'PATCH',
261-
body: JSON.stringify({ limits }),
265+
body: JSON.stringify({ limits: mergedLimits }),
262266
});
263267
}
264268

0 commit comments

Comments
 (0)