Skip to content

Commit

Permalink
chore(JavaScript/ditsmod): upgrade to v3.0.0-alpha.3 and fix dependen…
Browse files Browse the repository at this point in the history
…cies (#8133)
  • Loading branch information
KostyaTretyak authored Jan 9, 2025
1 parent a3a34b1 commit a429452
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions javascript/ditsmod-bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"author": "Your Name Here",
"license": "MIT",
"dependencies": {
"@ditsmod/body-parser": "^3.0.0-alpha.2",
"@ditsmod/core": "^3.0.0-alpha.2",
"@ditsmod/routing": "^3.0.0-alpha.2"
"@ditsmod/body-parser": "3.0.0-alpha.3",
"@ditsmod/core": "3.0.0-alpha.3",
"@ditsmod/routing": "3.0.0-alpha.3"
},
"devDependencies": {
"@types/node": "^22.9.0",
Expand Down
10 changes: 5 additions & 5 deletions javascript/ditsmod-bun/src/app/hello-world.controller.ts
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();
}
}
6 changes: 3 additions & 3 deletions javascript/ditsmod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"author": "Your Name Here",
"license": "MIT",
"dependencies": {
"@ditsmod/body-parser": "^3.0.0-alpha.2",
"@ditsmod/core": "^3.0.0-alpha.2",
"@ditsmod/routing": "^3.0.0-alpha.2"
"@ditsmod/body-parser": "3.0.0-alpha.3",
"@ditsmod/core": "3.0.0-alpha.3",
"@ditsmod/routing": "3.0.0-alpha.3"
},
"devDependencies": {
"@types/node": "^22.9.0",
Expand Down
10 changes: 5 additions & 5 deletions javascript/ditsmod/src/app/hello-world.controller.ts
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();
}
}

0 comments on commit a429452

Please sign in to comment.