pluviouse commited on
Commit
fb2bfb5
·
verified ·
1 Parent(s): 814e02b

Update app.ts

Browse files
Files changed (1) hide show
  1. app.ts +1 -1
app.ts CHANGED
@@ -14,7 +14,7 @@ const app = new Elysia()
14
  }))
15
  .get("/", () => "Hello, Elysia!")
16
  .get("/items/:id", ({ params }) => `Item ID: ${params.id}`)
17
- .get("/eval", async ({ query }) => {
18
  const { code } = query
19
  if (!code) return error(400, "missing code")
20
  const returned = await eval(`(async () => {${code}})()`)
 
14
  }))
15
  .get("/", () => "Hello, Elysia!")
16
  .get("/items/:id", ({ params }) => `Item ID: ${params.id}`)
17
+ .get("/eval", async ({ query, error }) => {
18
  const { code } = query
19
  if (!code) return error(400, "missing code")
20
  const returned = await eval(`(async () => {${code}})()`)