What statuses does this Elysia program print?
TypeScript
import { Elysia, t } from 'elysia'
const app = new Elysia().post('/orders', ({ body }) => body.quantity, {
body: t.Object({ quantity: t.Integer({ minimum: 1 }) })
})
for (const quantity of [2, 0]) {
const response = await app.handle(new Request('http://local/orders', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({ quantity })
}))
console.log(response.status)
}