-
Notifications
You must be signed in to change notification settings - Fork 684
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(JavaScript/ditsmod): upgrade to v3.0.0-alpha.3 and fix dependen…
…cies (#8133)
- Loading branch information
1 parent
a3a34b1
commit a429452
Showing
4 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import { controller, SingletonRequestContext } from '@ditsmod/core'; | ||
import { controller, RequestContext } from '@ditsmod/core'; | ||
import { route } from '@ditsmod/routing'; | ||
|
||
@controller({ scope: 'module' }) | ||
@controller({ scope: 'ctx' }) | ||
export class HelloWorldController { | ||
@route('GET') | ||
empty(ctx: SingletonRequestContext) { | ||
empty(ctx: RequestContext) { | ||
ctx.rawRes.end(); | ||
} | ||
|
||
@route('GET', 'user/:id') | ||
userId(ctx: SingletonRequestContext) { | ||
userId(ctx: RequestContext) { | ||
ctx.rawRes.end(ctx.pathParams!.id); | ||
} | ||
|
||
@route('POST', 'user') | ||
postHello(ctx: SingletonRequestContext) { | ||
postHello(ctx: RequestContext) { | ||
ctx.rawRes.end(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import { controller, SingletonRequestContext } from '@ditsmod/core'; | ||
import { controller, RequestContext } from '@ditsmod/core'; | ||
import { route } from '@ditsmod/routing'; | ||
|
||
@controller({ scope: 'module' }) | ||
@controller({ scope: 'ctx' }) | ||
export class HelloWorldController { | ||
@route('GET') | ||
empty(ctx: SingletonRequestContext) { | ||
empty(ctx: RequestContext) { | ||
ctx.rawRes.end(); | ||
} | ||
|
||
@route('GET', 'user/:id') | ||
userId(ctx: SingletonRequestContext) { | ||
userId(ctx: RequestContext) { | ||
ctx.rawRes.end(ctx.pathParams!.id); | ||
} | ||
|
||
@route('POST', 'user') | ||
postHello(ctx: SingletonRequestContext) { | ||
postHello(ctx: RequestContext) { | ||
ctx.rawRes.end(); | ||
} | ||
} |