Skip to content

Commit 85e747a

Browse files
fixed links
1 parent 419fdc5 commit 85e747a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

apps/items-service/src/html.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function getSwaggerHtml(appPrefix: string): string {
2323
</html>`;
2424
}
2525

26-
export function getRootPageHtml(appPrefix: string, apiPrefix: string): string {
26+
export function getRootPageHtml(): string {
2727
return `<!DOCTYPE html>
2828
<html lang="en">
2929
<head>
@@ -46,11 +46,11 @@ export function getRootPageHtml(appPrefix: string, apiPrefix: string): string {
4646
4747
<p>A simple REST API service for managing items, built with Bun and PostgreSQL.</p>
4848
49-
<p><a href="${appPrefix}/docs" target="_blank">Swagger Docs</a></p>
49+
<p><a href="/items/docs" target="_blank">Swagger Docs</a></p>
5050
5151
<p><strong>API Endpoints:</strong></p>
52-
<p><a href="${appPrefix}/${apiPrefix}/health" target="_blank">${apiPrefix}/health</a> - Service and database health check</p>
53-
<p><a href="${appPrefix}/${apiPrefix}/items" target="_blank">${apiPrefix}/items</a> - List all items</p>
52+
<p><a href="/items/v1/health" target="_blank">/v1/health</a> - Service and database health check</p>
53+
<p><a href="/items/v1/items" target="_blank">/v1/items</a> - List all items</p>
5454
</article>
5555
</div>
5656
</body>

apps/items-service/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ async function handle(req: Request): Promise<Response> {
9090
return json({ error: "Failed to fetch items" }, { status: 500 });
9191
}
9292
}
93+
response = new Response(getRootPageHtml(), { headers: { "content-type": "text/html; charset=utf-8" } });
9394

9495
if (path === "/items" && req.method === "POST") {
9596
try {

0 commit comments

Comments
 (0)