updated api preview docs

This commit is contained in:
Gani Georgiev
2022-11-08 20:53:31 +02:00
parent 3d14addfef
commit 39dc1d2795
42 changed files with 656 additions and 760 deletions

View File

@@ -7,22 +7,15 @@
export let collection = new Collection();
let responseTab = 200;
let responseTab = 204;
let responses = [];
$: backendAbsUrl = CommonHelper.getApiExampleUrl(ApiClient.baseUrl);
$: responses = [
{
code: 200,
body: JSON.stringify(
{
token: "JWT_TOKEN",
record: CommonHelper.dummyCollectionRecord(collection),
},
null,
2
),
code: 204,
body: "null",
},
{
code: 400,
@@ -45,7 +38,6 @@
<h3 class="m-b-sm">Confirm verification ({collection.name})</h3>
<div class="content txt-lg m-b-sm">
<p>Confirms <strong>{collection.name}</strong> account verification request.</p>
<p>Returns the refreshed auth data.</p>
</div>
<SdkTabs
@@ -56,12 +48,7 @@
...
const authData = await pb.collection('${collection?.name}').confirmVerification('TOKEN');
// after the above you can also access the auth data from the authStore
console.log(pb.authStore.isValid);
console.log(pb.authStore.token);
console.log(pb.authStore.model.id);
await pb.collection('${collection?.name}').confirmVerification('TOKEN');
`}
dart={`
import 'package:pocketbase/pocketbase.dart';
@@ -70,12 +57,7 @@
...
final authData = await pb.collection('${collection?.name}').confirmVerification('TOKEN');
// after the above you can also access the auth data from the authStore
console.log(pb.authStore.isValid);
console.log(pb.authStore.token);
console.log(pb.authStore.model.id);
await pb.collection('${collection?.name}').confirmVerification('TOKEN');
`}
/>