Skip to content

Commit 8f22903

Browse files
authored
refactor the list API pagination (#276)
* refactor http api pagination * refactor http api pagination * Optimize database indexing and improve API pagination logic * Optimize account_id field indexing in substrate.go * Enhance database migration logging and enable safety auto-migration * Refactor account extrinsic mapping logic and improve duplicate handling * Reduce HTTP server timeout from 30s to 10s in configuration * Remove api/optimize branch from Docker configuration
1 parent e4a67be commit 8f22903

35 files changed

Lines changed: 1518 additions & 600 deletions

cmd/commands.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ var commands = []cli.Command{
5252
return nil
5353
},
5454
},
55+
{
56+
Name: "MigrateAccountExtrinsicMapping",
57+
Usage: "refresh metadata",
58+
Action: func(c *cli.Context) error {
59+
return script.MigrateAccountExtrinsicMapping()
60+
},
61+
},
5562
{
5663
Name: "plugin",
5764
Usage: "plugin sub commands",

configs/config.yaml.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
server:
55
http:
66
addr: 0.0.0.0:4399
7-
timeout: 30s
7+
timeout: 10s
88
grpc:
99
addr: 0.0.0.0:9000
1010
database:

docs/api/docs.go

Lines changed: 120 additions & 82 deletions
Large diffs are not rendered by default.

docs/api/swagger.json

Lines changed: 120 additions & 82 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)