bun
This commit is contained in:
@@ -695,6 +695,7 @@ import type { getRouter } from './router.tsx'
|
||||
import type { createStart } from '@tanstack/react-start'
|
||||
declare module '@tanstack/react-start' {
|
||||
interface Register {
|
||||
ssr: true
|
||||
router: Awaited<ReturnType<typeof getRouter>>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@ export const Route = createFileRoute("/api/events/$")({
|
||||
middleware: [superTokensRequestMiddleware],
|
||||
handlers: {
|
||||
GET: ({ request, context }) => {
|
||||
logger.info("ServerEvents | New connection", context?.userAuthId);
|
||||
|
||||
const stream = new ReadableStream({
|
||||
start(controller) {
|
||||
const connectMessage = `data: ${JSON.stringify({ type: "connected" })}\n\n`;
|
||||
@@ -41,14 +39,6 @@ export const Route = createFileRoute("/api/events/$")({
|
||||
const cleanup = () => {
|
||||
serverEvents.off("test", handleEvent);
|
||||
clearInterval(pingInterval);
|
||||
try {
|
||||
logger.info(
|
||||
"ServerEvents | Closing connection",
|
||||
context?.userAuthId
|
||||
);
|
||||
} catch (e) {
|
||||
logger.error("ServerEvents | Error closing controller", e);
|
||||
}
|
||||
};
|
||||
|
||||
request.signal?.addEventListener("abort", cleanup);
|
||||
|
||||
@@ -11,7 +11,7 @@ const Header = ({ tournament }: HeaderProps) => {
|
||||
return (
|
||||
<>
|
||||
<Flex h="20dvh" px='xl' w='100%' align='self-end' gap='md'>
|
||||
<Avatar name={tournament.name} radius={0} withBorder={false} size={125} src={`/api/files/tournaments/${tournament.id}/${tournament.logo}`} />
|
||||
<Avatar name={tournament.name} radius={0} withBorder={false} size={150} src={`/api/files/tournaments/${tournament.id}/${tournament.logo}`} />
|
||||
<Flex align='center' justify='center' gap={4} pb={20} w='100%'>
|
||||
<Title ta='center' order={2}>{tournament.name}</Title>
|
||||
</Flex>
|
||||
|
||||
@@ -12,11 +12,6 @@ class PocketBaseAdminClient {
|
||||
public authPromise: Promise<void>;
|
||||
|
||||
constructor() {
|
||||
console.log('Environment variables loaded:', {
|
||||
POCKETBASE_URL: process.env.POCKETBASE_URL,
|
||||
POCKETBASE_ADMIN_EMAIL: process.env.POCKETBASE_ADMIN_EMAIL,
|
||||
POCKETBASE_ADMIN_PASSWORD: process.env.POCKETBASE_ADMIN_PASSWORD,
|
||||
});
|
||||
this.pb = new PocketBase(process.env.POCKETBASE_URL);
|
||||
|
||||
this.pb.beforeSend = (url, options) => {
|
||||
|
||||
@@ -14,6 +14,7 @@ const setupFetchInterceptor = () => {
|
||||
if (typeof window === 'undefined') return;
|
||||
|
||||
const originalFetch = window.fetch;
|
||||
//@ts-ignore
|
||||
window.fetch = async (resource: RequestInfo | URL, options?: RequestInit) => {
|
||||
const url = typeof resource === 'string' ? resource :
|
||||
resource instanceof URL ? resource.toString() : resource.url;
|
||||
|
||||
Reference in New Issue
Block a user