Task: Fixed and updated for export all functions for decorators
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
923e08949b
commit
dd445a22c0
@ -1,6 +1,5 @@
|
||||
import { Request, Response } from "express"
|
||||
import Controller from "../decorators/controller.decorator"
|
||||
import { Get } from "../decorators/handlers.decorator"
|
||||
import { Controller, Get } from "../decorators"
|
||||
|
||||
@Controller("/hello")
|
||||
export default class IndexController {
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { Request, Response } from "express"
|
||||
import Controller from "../decorators/controller.decorator"
|
||||
import { Post, Get, Delete } from "../decorators/handlers.decorator"
|
||||
import { Controller, Delete, Get, Post } from "../decorators"
|
||||
|
||||
const persons: Array<any> = [
|
||||
{
|
||||
|
@ -1,9 +1,7 @@
|
||||
import { MetadataKeys } from "../constants/metadata.keys"
|
||||
|
||||
const Controller = (basePath: string): ClassDecorator => {
|
||||
export const Controller = (basePath: string): ClassDecorator => {
|
||||
return (target: any) => {
|
||||
Reflect.defineMetadata(MetadataKeys.BASE_PATH, basePath, target)
|
||||
}
|
||||
}
|
||||
|
||||
export default Controller
|
||||
|
2
src/decorators/index.ts
Normal file
2
src/decorators/index.ts
Normal file
@ -0,0 +1,2 @@
|
||||
export * from "./controller.decorator"
|
||||
export * from "./handlers.decorator"
|
Loading…
Reference in New Issue
Block a user