remove notifications for now

This commit is contained in:
Andras Bacsai 2022-05-19 14:32:31 +02:00
parent 56ab8312f1
commit 70a3fc247e
2 changed files with 0 additions and 42 deletions

View File

@ -83,9 +83,6 @@
} finally {
}
}
try {
const data = await get(`/notifications.json`);
} catch (error) {}
}
});
@ -531,15 +528,6 @@
>Powered by <a href="https://coolify.io" target="_blank">Coolify</a></span
>
{/if}
{#if !$isTraefikUsed}
<span class="fixed bottom-[20px] right-[10px] z-50 m-2 px-4 text-xs ">
<a href="/settings"
><button class="bg-coollabs hover:bg-coollabs-100"
>New proxy is available! <br />Click here to get more details</button
></a
>
</span>
{/if}
{/if}
<main>
<slot />

View File

@ -1,30 +0,0 @@
import { ErrorHandler } from '$lib/database';
import { version } from '$lib/common';
import * as db from '$lib/database';
import type { RequestHandler } from '@sveltejs/kit';
export const get: RequestHandler = async (request) => {
try {
const unreadNotifications = await db.prisma.notification.findMany({
where: { isRead: false, showAtVersion: version }
});
return {
status: 200,
body: {
...unreadNotifications
}
};
} catch (error) {
console.log(error);
return ErrorHandler(error);
}
};
export const post: RequestHandler = async (event) => {
const { type, latestVersion } = await event.request.json();
const settings = await db.prisma.setting.findFirst();
return {
status: 500
};
};