Skip to content

Commit

Permalink
1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jiawei397 committed Feb 7, 2022
1 parent f95914c commit 3ca3873
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ import {
Query,
Res,
UseGuards,
} from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
import type { CanActivate } from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
} from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";
import type { CanActivate } from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";
import mockjs from "https://deno.land/x/deno_mock@v2.0.0/mod.ts";
import { delay } from "https://deno.land/std/async/mod.ts";

Expand Down Expand Up @@ -179,7 +179,7 @@ You can use `Injectable` to flag the service can be injectable, and it can be
used by your Controller or other Service.

```ts
import { Injectable } from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
import { Injectable } from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";

@Injectable()
export class RoleService {
Expand Down Expand Up @@ -222,7 +222,7 @@ If you like to use the `Service` alone in anywhere, you can with `Factory` like
this:

```ts
import { Factory } from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
import { Factory } from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";
Factory(UserService).info();
```

Expand All @@ -232,7 +232,7 @@ Factory(UserService).info();
import { UserController } from "./user.controller.ts";
import { User2Controller } from "./user2.controller.ts";
import { RoleController } from "./role.controller.ts";
import { Router } from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
import { Router } from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";

const router = new Router();
await router.add(UserController);
Expand All @@ -252,7 +252,7 @@ import {
Router,
send,
Status,
} from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
} from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";

const app = new Application();

Expand Down Expand Up @@ -280,7 +280,7 @@ now you can visit
First is the AppModule:

```ts
import { Module } from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
import { Module } from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";
import { AppController } from "./app.controller.ts";
import { UserModule } from "./user/user.module.ts";

Expand All @@ -297,7 +297,7 @@ Then is `UserModule`, and the `providers` can contain the services which are not
used by controllers.

```ts
import { Module } from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
import { Module } from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";
import { RoleController } from "./controllers/role.controller.ts";
import { UserController } from "./controllers/user.controller.ts";
import { User2Controller } from "./controllers/user2.controller.ts";
Expand Down Expand Up @@ -326,7 +326,7 @@ import {
isHttpError,
NestFactory,
Status,
} from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
} from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";
import { AppModule } from "./app.module.ts";

const app = await NestFactory.create(AppModule);
Expand Down Expand Up @@ -356,7 +356,7 @@ await app.listen({ port });
If you want to connect db such as Mongodb, you can do like this:

```ts
import { Module } from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
import { Module } from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";
import { AppController } from "./app.controller.ts";
import { UserModule } from "./user/user.module.ts";

Expand Down Expand Up @@ -397,7 +397,7 @@ async function getModel<T>(
You can also use the `Inject` decorator to help you:

```ts
import { Inject } from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
import { Inject } from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";
export const InjectModel = (Cls: Constructor) => Inject(() => getModel(Cls));
```

Expand Down Expand Up @@ -427,7 +427,7 @@ In the above code, `this.model` is the `getModel` result.
You can also register a Dynamic Module like this:

```ts
import { DynamicModule } from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
import { DynamicModule } from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";
import { ASYNC_KEY } from "./async.constant.ts";
import { AsyncService } from "./async.service.ts";

Expand All @@ -450,7 +450,7 @@ export class AsyncModule {
And the `AsyncService` like this:

```ts
import { Inject, Injectable } from "https://deno.land/x/oak_nest@v1.1.4/mod.ts";
import { Inject, Injectable } from "https://deno.land/x/oak_nest@v1.1.5/mod.ts";
import { ASYNC_KEY } from "./async.constant.ts";

@Injectable()
Expand Down
2 changes: 1 addition & 1 deletion scripts.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.1.4
version: 1.1.5
name: oak_nest
scripts:
dev:
Expand Down

0 comments on commit 3ca3873

Please sign in to comment.