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

Commit 9e87c8c

Browse files
committed
fix: include all required fields (allocation, feature_limits) in build update payload
1 parent 83b685c commit 9e87c8c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

services/pyrodactyl.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,18 @@ 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
259+
// Fetch current server to get all required fields
260260
const server = await getServerById(serverId);
261261
const currentLimits = server.limits || {};
262262
const mergedLimits = { ...currentLimits, ...limits };
263263
await pteroFetch(`/servers/${serverId}/build`, {
264264
method: 'PATCH',
265-
body: JSON.stringify({ limits: mergedLimits }),
265+
body: JSON.stringify({
266+
allocation: server.allocation,
267+
...mergedLimits,
268+
feature_limits: server.feature_limits || { databases: 0, allocations: 1, backups: 1 },
269+
oom_disabled: server.oom_disabled ?? true,
270+
}),
266271
});
267272
}
268273

0 commit comments

Comments
 (0)