first
This commit is contained in:
7
src/utils/register.ts
Normal file
7
src/utils/register.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { RequestHandler } from "../type/request";
|
||||
import router from "../routers/router";
|
||||
const RegistHandler = (method: "get" | "post" | "options", url: string ,handler: RequestHandler<any, any>) => {
|
||||
router[method](url, handler as any);
|
||||
}
|
||||
|
||||
export { RegistHandler };
|
||||
Reference in New Issue
Block a user