-
Notifications
You must be signed in to change notification settings - Fork 41
docs: provide how to disabled demo mode example #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -39,6 +39,31 @@ tiny-pro | |||||
|
|
||||||
| 后端服务支持`docker启动`与`命令启动`, 执行操作前请先确保所处位置为`tiny-pro/nestJS` | ||||||
|
|
||||||
| ### 关闭演示模式 | ||||||
|
|
||||||
| `TinyPro` 提供了一个 `RejectGuard` 的 `Guard`. 如果你需要关闭演示模式, 请在 `nestJS/src/app.module.ts` 中移除 L66~L69. 最终代码应当如下 | ||||||
|
|
||||||
|
Comment on lines
+44
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix guard name and wording; remove brittle line-number reference.
Apply: -`TinyPro` 提供了一个 `RejectGuard` 的 `Guard`. 如果你需要关闭演示模式, 请在 `nestJS/src/app.module.ts` 中移除 L66~L69. 最终代码应当如下
+`TinyPro` 提供了一个名为 `RejectRequestGuard` 的 Guard。若需关闭演示模式,请在 `nestJS/src/app.module.ts` 的 `@Module` 中移除 `APP_GUARD` 的 `useClass: RejectRequestGuard` 提供者项(如下所示的删除块)。最终代码应当如下:📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| ```diff | ||||||
| @Module({ | ||||||
| ... | ||||||
| providers: [ | ||||||
| { | ||||||
| provide: APP_GUARD, | ||||||
| useClass: AuthGuard, | ||||||
| }, | ||||||
| - { | ||||||
| - provide: APP_GUARD, | ||||||
| - useClass: RejectRequestGuard, | ||||||
| - }, | ||||||
| { | ||||||
| provide: APP_GUARD, | ||||||
| useClass: PermissionGuard, | ||||||
| }, | ||||||
| ], | ||||||
| }) | ||||||
| export class AppModule implements OnModuleInit { | ||||||
| ``` | ||||||
|
|
||||||
| ### Docker启动 | ||||||
|
|
||||||
| 在运行`docker compose up -d`之前,请先修改`.env`环境变量文件,示例如下 | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Same guard name mismatch and brittle line-number reference.
与另一篇文档相同,说明文字应使用
RejectRequestGuard,且不应引用“L66~L69”。Apply:
📝 Committable suggestion
🤖 Prompt for AI Agents