mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
chore: npm run format
This commit is contained in:
@@ -252,7 +252,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
{#if data.options?.requiresVerification && data.auth?.cf_turnstile_site_key}
|
{#if data.options?.requiresVerification && data.auth?.cf_turnstile_site_key}
|
||||||
<div
|
<div
|
||||||
class="mt-2 min-h-16.25 flex w-auto items-center justify-center rounded border border-neutral-700 bg-neutral-800 p-2 pb-1"
|
class="mt-2 flex min-h-16.25 w-auto items-center justify-center rounded border border-neutral-700 bg-neutral-800 p-2 pb-1"
|
||||||
>
|
>
|
||||||
<div class="cf-turnstile" data-sitekey={data.auth.cf_turnstile_site_key}></div>
|
<div class="cf-turnstile" data-sitekey={data.auth.cf_turnstile_site_key}></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -33,16 +33,19 @@ export const load: PageServerLoad = async ({ params, fetch, url, cookies }) => {
|
|||||||
if (viewJson.success === true && viewJson.message !== 'View already recorded.') {
|
if (viewJson.success === true && viewJson.message !== 'View already recorded.') {
|
||||||
pasteData.views += 1;
|
pasteData.views += 1;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
console.error(
|
||||||
console.error(`Failed to increment view count for paste ${id}, status code ${viewed.status}: ${await viewed.text()}`);
|
`Failed to increment view count for paste ${id}, status code ${viewed.status}: ${await viewed.text()}`
|
||||||
|
);
|
||||||
if (apiKey === '') {
|
if (apiKey === '') {
|
||||||
console.error('The API key for internal requests is not set. Please configure it in the environment variables.');
|
console.error(
|
||||||
|
'The API key for internal requests is not set. Please configure it in the environment variables.'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const pasteContent = await fetch(`/api/paste/${id}/raw`);
|
const pasteContent = await fetch(`/api/paste/${id}/raw`);
|
||||||
const pasteOptions = await fetch('/api/paste/info');
|
const pasteOptions = await fetch('/api/paste/info');
|
||||||
const options = await pasteOptions.json();
|
const options = await pasteOptions.json();
|
||||||
const content = await pasteContent.text();
|
const content = await pasteContent.text();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user