Merge pull request #319 from PretendoNetwork/fix/provisioning-updates
Some checks failed
Build and Publish Docker Image / Build and Publish Docker Image (amd64) (push) Has been cancelled
Build and Publish Docker Image / Build and Publish Docker Image (arm64) (push) Has been cancelled

Fix/provisioning updates
This commit is contained in:
William Oldham 2026-01-14 21:25:00 +00:00 committed by GitHub
commit d99d02cb0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,15 +8,17 @@ import { Server } from './models/server';
// Provisioning has a couple edgecases:
// - It will only update existing entries, will not add new one
// - Only the fields in the below schema will be updated
// - Set fields to null to unset them. Undefined means it won't be modified
const serverProvisioningSchema = z.object({
servers: z.array(z.object({
id: z.string(),
name: z.string(),
ip: z.string().optional(),
ipList: z.array(z.string()).optional(),
port: z.coerce.number(),
health_check_port: z.coerce.number().optional()
name: z.string().optional(),
ip: z.string().nullable().optional(),
ip_list: z.array(z.string()).optional(),
port: z.number().optional(),
health_check_port: z.number().nullable().optional(),
aes_key: z.string().optional()
}))
});
@ -42,10 +44,11 @@ export async function handleServerProvisioning(): Promise<void> {
$set: {
_id: id,
service_name: server.name,
ipList: server.ipList,
ip_list: server.ip_list,
ip: server.ip,
port: server.port,
health_check_port: server.health_check_port
health_check_port: server.health_check_port,
aes_key: server.aes_key
}
});
if (!result) {