From 634791100647a70997f1c6cfb18283471f75ec65 Mon Sep 17 00:00:00 2001 From: Scaleway Bot Date: Mon, 22 Jul 2024 11:08:51 +0200 Subject: [PATCH] fix(webhosting): add missing post body (#1370) Co-authored-by: Jonathan R. --- packages/clients/src/api/webhosting/v1alpha1/api.gen.ts | 9 +++++---- .../src/api/webhosting/v1alpha1/marshalling.gen.ts | 8 ++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/clients/src/api/webhosting/v1alpha1/api.gen.ts b/packages/clients/src/api/webhosting/v1alpha1/api.gen.ts index 3ed02ff2c..bb79ae5ab 100644 --- a/packages/clients/src/api/webhosting/v1alpha1/api.gen.ts +++ b/packages/clients/src/api/webhosting/v1alpha1/api.gen.ts @@ -10,6 +10,7 @@ import { import type { Region, WaitForOptions } from '../../../bridge' import { HOSTING_TRANSIENT_STATUSES } from './content.gen' import { + marshalCheckUserOwnsDomainRequest, marshalCreateHostingRequest, marshalUpdateHostingRequest, unmarshalCheckUserOwnsDomainResponse, @@ -235,12 +236,12 @@ export class API extends ParentAPI { checkUserOwnsDomain = (request: Readonly) => this.client.fetch( { + body: JSON.stringify( + marshalCheckUserOwnsDomainRequest(request, this.client.settings), + ), + headers: jsonContentHeaders, method: 'POST', path: `/webhosting/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domain', request.domain)}/check-ownership`, - urlParams: urlParams([ - 'project_id', - request.projectId ?? this.client.settings.defaultProjectId, - ]), }, unmarshalCheckUserOwnsDomainResponse, ) diff --git a/packages/clients/src/api/webhosting/v1alpha1/marshalling.gen.ts b/packages/clients/src/api/webhosting/v1alpha1/marshalling.gen.ts index 922b48ad7..f49f3d3bc 100644 --- a/packages/clients/src/api/webhosting/v1alpha1/marshalling.gen.ts +++ b/packages/clients/src/api/webhosting/v1alpha1/marshalling.gen.ts @@ -8,6 +8,7 @@ import { } from '../../../bridge' import type { DefaultValues } from '../../../bridge' import type { + CheckUserOwnsDomainRequest, CheckUserOwnsDomainResponse, ControlPanel, CreateHostingRequest, @@ -278,6 +279,13 @@ export const unmarshalSession = (data: unknown): Session => { } as Session } +export const marshalCheckUserOwnsDomainRequest = ( + request: CheckUserOwnsDomainRequest, + defaults: DefaultValues, +): Record => ({ + project_id: request.projectId ?? defaults.defaultProjectId, +}) + const marshalCreateHostingRequestDomainConfiguration = ( request: CreateHostingRequestDomainConfiguration, defaults: DefaultValues,