Skip to content

Commit e62c03c

Browse files
jbl428imdudu1
andcommitted
fix: apply nest's injectable decorator to http interface
Co-authored-by: imdudu1 <[email protected]>
1 parent 04ddc66 commit e62c03c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
import { applyDecorators, Injectable } from "@nestjs/common";
12
import { HTTP_INTERFACE_METADATA } from "./constants";
23

34
export function HttpInterface(url = ""): ClassDecorator {
4-
return (target) => {
5+
const decorator: ClassDecorator = (target) => {
56
Reflect.defineMetadata(HTTP_INTERFACE_METADATA, url, target);
67
};
8+
9+
return applyDecorators(Injectable, decorator);
710
}

0 commit comments

Comments
 (0)