Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/modules/website/__tests__/website.repository.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe("Website repository integration test", () => {
url: "https://trackflow.dev",
isActive: true
};
const createdSite = await siteRepository.create(db, testMockSite);
const createdSite = await siteRepository.create(db, testMockSite as any);
expect(createdSite).toBeDefined();
});
});
2 changes: 1 addition & 1 deletion src/pages/api/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const POST: APIRoute = async ({ request, locals }) => {

// 6. Fire your type-safe database service ingestion operation block!
// If the incoming event URL is localhost, mock a successful save and skip DB ingestion
let savedId = "mocked-local-id";
let savedId: any = "mocked-local-id";

if (isProductionOrRemote(rawBody.url)) {
// 6. Fire your type-safe database service ingestion operation block!
Expand Down
19 changes: 12 additions & 7 deletions src/worker.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// src/worker.ts
import { handle } from '@astrojs/cloudflare/handler';
import type { SSRManifest } from 'astro';
import { App } from 'astro/app';


export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext) {
return handle(request, env, ctx);
}
} satisfies ExportedHandler<Env>;
export function createExports(manifest: SSRManifest) {
const app = new App(manifest);
return {
default: {
async fetch(request: Request, env: Env, ctx: ExecutionContext) {
return app.render(request, { locals: { runtime: { env, ctx } } });
},
} satisfies ExportedHandler<Env>,
};
}
Loading