merge v0.23.0-rc changes

This commit is contained in:
Gani Georgiev
2024-09-29 19:23:19 +03:00
parent ad92992324
commit 844f18cac3
753 changed files with 85141 additions and 63396 deletions
@@ -2,16 +2,16 @@
import ApiClient from "@/utils/ApiClient";
import CommonHelper from "@/utils/CommonHelper";
import CodeBlock from "@/components/base/CodeBlock.svelte";
import SdkTabs from "@/components/collections/docs/SdkTabs.svelte";
import SdkTabs from "@/components/base/SdkTabs.svelte";
export let collection;
let responseTab = 204;
let responses = [];
$: adminsOnly = collection?.deleteRule === null;
$: superusersOnly = collection?.deleteRule === null;
$: backendAbsUrl = CommonHelper.getApiExampleUrl(ApiClient.baseUrl);
$: backendAbsUrl = CommonHelper.getApiExampleUrl(ApiClient.baseURL);
$: if (collection?.id) {
responses.push({
@@ -32,13 +32,13 @@
`,
});
if (adminsOnly) {
if (superusersOnly) {
responses.push({
code: 403,
body: `
{
"code": 403,
"message": "Only admins can access this action.",
"message": "Only superusers can access this action.",
"data": {}
}
`,
@@ -92,8 +92,8 @@
/api/collections/<strong>{collection.name}</strong>/records/<strong>:id</strong>
</p>
</div>
{#if adminsOnly}
<p class="txt-hint txt-sm txt-right">Requires admin <code>Authorization:TOKEN</code> header</p>
{#if superusersOnly}
<p class="txt-hint txt-sm txt-right">Requires superuser <code>Authorization:TOKEN</code> header</p>
{/if}
</div>