Skip to content

Commit 6347911

Browse files
fix(webhosting): add missing post body (#1370)
Co-authored-by: Jonathan R. <[email protected]>
1 parent 9afb0ac commit 6347911

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

packages/clients/src/api/webhosting/v1alpha1/api.gen.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
import type { Region, WaitForOptions } from '../../../bridge'
1111
import { HOSTING_TRANSIENT_STATUSES } from './content.gen'
1212
import {
13+
marshalCheckUserOwnsDomainRequest,
1314
marshalCreateHostingRequest,
1415
marshalUpdateHostingRequest,
1516
unmarshalCheckUserOwnsDomainResponse,
@@ -235,12 +236,12 @@ export class API extends ParentAPI {
235236
checkUserOwnsDomain = (request: Readonly<CheckUserOwnsDomainRequest>) =>
236237
this.client.fetch<CheckUserOwnsDomainResponse>(
237238
{
239+
body: JSON.stringify(
240+
marshalCheckUserOwnsDomainRequest(request, this.client.settings),
241+
),
242+
headers: jsonContentHeaders,
238243
method: 'POST',
239244
path: `/webhosting/v1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domain', request.domain)}/check-ownership`,
240-
urlParams: urlParams([
241-
'project_id',
242-
request.projectId ?? this.client.settings.defaultProjectId,
243-
]),
244245
},
245246
unmarshalCheckUserOwnsDomainResponse,
246247
)

packages/clients/src/api/webhosting/v1alpha1/marshalling.gen.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
} from '../../../bridge'
99
import type { DefaultValues } from '../../../bridge'
1010
import type {
11+
CheckUserOwnsDomainRequest,
1112
CheckUserOwnsDomainResponse,
1213
ControlPanel,
1314
CreateHostingRequest,
@@ -278,6 +279,13 @@ export const unmarshalSession = (data: unknown): Session => {
278279
} as Session
279280
}
280281

282+
export const marshalCheckUserOwnsDomainRequest = (
283+
request: CheckUserOwnsDomainRequest,
284+
defaults: DefaultValues,
285+
): Record<string, unknown> => ({
286+
project_id: request.projectId ?? defaults.defaultProjectId,
287+
})
288+
281289
const marshalCreateHostingRequestDomainConfiguration = (
282290
request: CreateHostingRequestDomainConfiguration,
283291
defaults: DefaultValues,

0 commit comments

Comments
 (0)