mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
fix(frontend:paste): increase paste views only if api returns 'Paste view recorded.'
This commit is contained in:
@@ -33,7 +33,7 @@ export const load: PageServerLoad = async ({ params, fetch, url, cookies, parent
|
|||||||
|
|
||||||
if (viewed.status === 200) {
|
if (viewed.status === 200) {
|
||||||
const viewJson = await viewed.json();
|
const viewJson = await viewed.json();
|
||||||
if (viewJson.success === true && viewJson.message !== 'View already recorded.') {
|
if (viewJson.success === true && viewJson.message === 'Paste view recorded.') {
|
||||||
pasteData.views += 1;
|
pasteData.views += 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user