Skip to content

Commit 20f1f5b

Browse files
committed
Update the Action.Mode.
1 parent 7a72142 commit 20f1f5b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

en/api/action.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@ The `@Action` annotation is used to define routes and commands in tinystruct app
66

77
### Parameters
88

9-
| Parameter | Type | Description |
10-
|-----------|------|-------------|
11-
| value | String | The URL pattern or command name |
12-
| description | String | Description of the action (optional) |
13-
| options | Argument[] | Command line arguments (optional) |
14-
| mode | Action.Mode | Execution mode (All, CLI, or Web) |
9+
| Parameter | Type | Description |
10+
|-----------|------|----------------------------------------------|
11+
| value | String | The URL pattern or command name |
12+
| description | String | Description of the action (optional) |
13+
| options | Argument[] | Command line arguments (optional) |
14+
| mode | Action.Mode | Execution mode (All, CLI, or HTTP_GET, etc.) |
1515

1616
### Example
1717

1818
```java
1919
@Action(
2020
value = "users",
2121
description = "Get user by ID",
22-
mode = Action.Mode.Web
22+
mode = Action.Mode.HTTP_GET
2323
)
2424
public User getUser(Integer id) {
2525
return userService.findById(id);

zh/api/action.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
@Action(
2020
value = "users",
2121
description = "根据ID获取用户",
22-
mode = Action.Mode.Web
22+
mode = Action.Mode.HTTP_GET
2323
)
2424
public User getUser(Integer id) {
2525
return userService.findById(id);

0 commit comments

Comments
 (0)