swordjs / sword-framework

A small and flexible for serverless nodejs framework 💗
25 stars 3 forks source link

当有多个指示器时,程序都仅支持Get请求 #1

Closed seho-dev closed 2 years ago

seho-dev commented 2 years ago
import { useApi, Get, Post } from '@sword-code-practice/sword-framework';
import { ReqQuery, ReqParams, Res } from './proto';

export const main = useApi<{
  query: ReqQuery;
  params: ReqParams;
  res: Res;
}>({
  instruct: [Get(), Post()],
  handler: (ctx) => {
    return {
      message: 'hello'
    };
  }
});
seho-dev commented 2 years ago

image

seho-dev commented 2 years ago

等待pr合并:https://github.com/unjs/h3/pull/92