From 214f611dc24d6eddd443358573638c0ea7df5250 Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Fri, 12 Dec 2025 12:38:33 +0100 Subject: [PATCH] fix: Send signature and message in publishService body The auth middleware expects username, signature, and message in the request body for POST requests. The service object already contains signature and message from rondevu.ts, so we just need to ensure they're sent by spreading the service object and adding username. --- src/api.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api.ts b/src/api.ts index 95f1936..6aaa310 100644 --- a/src/api.ts +++ b/src/api.ts @@ -398,14 +398,15 @@ export class RondevuAPI { * Service FQN must include username: service:version@username */ async publishService(service: ServiceRequest): Promise { - const auth = await this.generateAuthParams('publishService', service.serviceFqn); - const response = await fetch(`${this.baseUrl}/services`, { method: 'POST', headers: { 'Content-Type': 'application/json', }, - body: JSON.stringify({ ...service, username: auth.username }), + body: JSON.stringify({ + ...service, + username: this.username + }), }) if (!response.ok) {