quasqui
Version:
The meta-framework suite designed from scratch for frontend-focused modern web development.
18 lines (15 loc) • 343 B
text/typescript
import { String, match } from '@modern-js/bff-runtime';
export const get = match(
{
request: { query: { id: String } },
response: { id: String },
},
({ query: { id } }) => ({ id }),
);
export const post = match(
{
request: { data: { id: String } },
response: { id: String },
},
({ data: { id } }) => ({ id }),
);