mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-03-21 17:44:49 -05:00
fix: fix incorrect ID handling in provisioning
This commit is contained in:
parent
c6c5a36c64
commit
b32bcadc05
|
|
@ -36,11 +36,9 @@ export async function handleServerProvisioning(): Promise<void> {
|
|||
LOG_INFO('Starting server provisioning');
|
||||
for (const server of serverData.servers) {
|
||||
const id = new mongoose.Types.ObjectId(server.id);
|
||||
const result = await Server.findOneAndUpdate({
|
||||
id
|
||||
}, {
|
||||
const result = await Server.findOneAndUpdate(id, {
|
||||
$set: {
|
||||
id,
|
||||
_id: id,
|
||||
service_name: server.name,
|
||||
ip: server.ip,
|
||||
port: server.port
|
||||
|
|
@ -50,6 +48,7 @@ export async function handleServerProvisioning(): Promise<void> {
|
|||
LOG_WARN(`Could not find existing server DB entry for ID ${server.id} - skipping provisioning`);
|
||||
}
|
||||
}
|
||||
LOG_INFO(`Finished provisioning ${serverData.servers.length} servers`);
|
||||
}
|
||||
|
||||
export function startProvisioner(): void {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user