Skip to content

Commit 9f23887

Browse files
chore: minor changes
1 parent 6d58408 commit 9f23887

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { Hono } from "hono";
2-
import { registerResources, type Resource } from "muppet";
2+
import { registerResources } from "muppet";
33

44
const app = new Hono();
55

66
app.post(
77
"/documents",
88
registerResources((c) => {
9-
return c.json<Resource[]>([
9+
return [
1010
{
1111
type: "template", // This tells muppet that this is a dynamic resource
1212
uri: "https://lorem.{value}",
@@ -16,6 +16,6 @@ app.post(
1616
return ["muppet", "hono", "mcps"];
1717
},
1818
},
19-
]);
19+
];
2020
}),
2121
);
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { Hono } from "hono";
2-
import { registerResources, type Resource } from "muppet";
2+
import { registerResources } from "muppet";
33

44
const app = new Hono();
55

66
app.post(
77
"/documents",
88
registerResources((c) => {
9-
return c.json<Resource[]>([
9+
return [
1010
{
1111
type: "template", // This tells muppet that this is a dynamic resource
1212
uri: "https://lorem.{ending}",
1313
name: "Todo list",
1414
mimeType: "text/plain",
1515
},
16-
]);
16+
];
1717
}),
1818
);
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { Hono } from "hono";
2-
import { registerResources, type Resource } from "muppet";
2+
import { registerResources } from "muppet";
33

44
const app = new Hono();
55

66
app.post(
77
"/documents",
88
registerResources((c) => {
9-
return c.json<Resource[]>([
9+
return [
1010
{
1111
uri: "https://lorem.ipsum",
1212
name: "Todo list",
1313
mimeType: "text/plain",
1414
},
15-
]);
15+
];
1616
}),
1717
);

packages/core/src/muppet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export function createMuppetServer<
231231
throw new Error(`Unable to find the handler for ${protocol} protocol!`);
232232
}
233233

234-
const contents = handler(params.uri);
234+
const contents = await handler(params.uri);
235235

236236
if (Array.isArray(contents))
237237
return c.json({

0 commit comments

Comments
 (0)