2022-10-30 16:28:14 +08:00
|
|
|
<script>
|
|
|
|
import CodeBlock from "@/components/base/CodeBlock.svelte";
|
|
|
|
|
2023-08-15 02:20:49 +08:00
|
|
|
export let collection;
|
2022-10-30 16:28:14 +08:00
|
|
|
|
2022-11-09 02:53:31 +08:00
|
|
|
let responseTab = 204;
|
2022-10-30 16:28:14 +08:00
|
|
|
let responses = [];
|
|
|
|
|
|
|
|
$: responses = [
|
|
|
|
{
|
2022-11-09 02:53:31 +08:00
|
|
|
code: 204,
|
|
|
|
body: "null",
|
2022-10-30 16:28:14 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
code: 400,
|
|
|
|
body: `
|
|
|
|
{
|
|
|
|
"code": 400,
|
2024-10-28 04:12:37 +08:00
|
|
|
"message": "An error occurred while validating the submitted data.",
|
2022-10-30 16:28:14 +08:00
|
|
|
"data": {
|
|
|
|
"token": {
|
|
|
|
"code": "validation_required",
|
|
|
|
"message": "Missing required value."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="alert alert-success">
|
|
|
|
<strong class="label label-primary">POST</strong>
|
|
|
|
<div class="content">
|
|
|
|
<p>
|
|
|
|
/api/collections/<strong>{collection.name}</strong>/confirm-email-change
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="section-title">Body Parameters</div>
|
|
|
|
<table class="table-compact table-border m-b-base">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Param</th>
|
|
|
|
<th>Type</th>
|
|
|
|
<th width="50%">Description</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div class="inline-flex">
|
|
|
|
<span class="label label-success">Required</span>
|
|
|
|
<span>token</span>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span class="label">String</span>
|
|
|
|
</td>
|
|
|
|
<td>The token from the change email request email.</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<div class="inline-flex">
|
|
|
|
<span class="label label-success">Required</span>
|
|
|
|
<span>password</span>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<span class="label">String</span>
|
|
|
|
</td>
|
|
|
|
<td>The account password to confirm the email change.</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<div class="section-title">Responses</div>
|
|
|
|
<div class="tabs">
|
2023-09-01 17:44:43 +08:00
|
|
|
<div class="tabs-header compact combined left">
|
2022-10-30 16:28:14 +08:00
|
|
|
{#each responses as response (response.code)}
|
|
|
|
<button
|
|
|
|
class="tab-item"
|
|
|
|
class:active={responseTab === response.code}
|
|
|
|
on:click={() => (responseTab = response.code)}
|
|
|
|
>
|
|
|
|
{response.code}
|
|
|
|
</button>
|
|
|
|
{/each}
|
|
|
|
</div>
|
|
|
|
<div class="tabs-content">
|
|
|
|
{#each responses as response (response.code)}
|
|
|
|
<div class="tab-item" class:active={responseTab === response.code}>
|
|
|
|
<CodeBlock content={response.body} />
|
|
|
|
</div>
|
|
|
|
{/each}
|
|
|
|
</div>
|
|
|
|
</div>
|