Skip to content

Commit

Permalink
Update README.md (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasad1 authored Sep 20, 2024
1 parent 91c37de commit 88e77f1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ The tool is based on the subxt library and is written in Rust.
- `GET /docs/` - swagger UI
- `GET /docs/openapi.json` - OpenAPI JSON schema
- `GET /docs/openapi.yaml` - OpenAPI YAML schema
- `GET /submissions` - Get all submissions from the database in JSON format.
- `GET /submissions/` - Get all submissions from the database in JSON format.
- `GET /submissions/{n}` - Get the `n` most recent submissions from the database in JSON format, n is a number.
- `GET /elections` - Dump all elections from the database in JSON format.
- `GET /elections/` - Dump all elections from the database in JSON format.
- `GET /elections/{n}` - Get the `n` most recent winners from the database in JSON format, n is a number.
- `GET /unsigned-elections/` - Dump all elections that were completed based on unsigned solutions.
- `GET /unsigned-elections/{n}` - Get the `n` most recent elections that were completed based on unsigned solutons.
- `GET /failed_elections/` - Get all failed elections.
- `GET /failed_elections/` - Get the `n` most recent failed elections.
- `GET /slashed` - Get all slashed solutions from the database in JSON format.
- `GET /slashed/{n}` - Get the `n` most recent slashed solutions from the database in JSON format, n is a number.

Expand Down Expand Up @@ -160,4 +164,4 @@ $ curl "http://localhost:9999/slashed/1"
### Database migrations

This tool has a simple database with three tables: `submissions`, `elections` and `slashed` which is located in the `migrations` folder.
To add a new migration, just create a new file with the following format: `V{version}__{description}.sql` and it will be automatically applied when the tool is started.
To add a new migration, just create a new file with the following format: `V{version}__{description}.sql` and it will be automatically applied when the tool is started.

0 comments on commit 88e77f1

Please sign in to comment.