mirror of
https://github.com/ditatompel/xmr-remote-nodes.git
synced 2025-01-08 20:09:43 +00:00
removing current page & next page in api response
This response was used for my HTMX "infinite scroll" data, which is not used in this Svelte project.
This commit is contained in:
parent
5496692c5d
commit
ec11fa0126
2 changed files with 7 additions and 8 deletions
11
README.md
11
README.md
|
@ -1,12 +1,15 @@
|
|||
# XMR Nodes
|
||||
# XMR Remote Nodes
|
||||
|
||||
Source code of [https://xmr.ditatompel.com](https://xmr.ditatompel.com).
|
||||
|
||||
## Requirements
|
||||
|
||||
- [GeoIP Database](https://dev.maxmind.com/geoip/geoip2/geolite2/) (place it to `./assets/geoip`, see [./internal/repo/geoip.go](./internal/repo/geoip.go)).
|
||||
- Linux Machine (AMD64 or ARM64)
|
||||
- [GeoIP Database](https://dev.maxmind.com/geoip/geoip2/geolite2/) (for server, optional). Place it to `./assets/geoip`, see [./internal/repo/geoip.go](./internal/repo/geoip.go).
|
||||
|
||||
## Installation
|
||||
|
||||
For initial server setup:
|
||||
### For initial server setup:
|
||||
|
||||
1. Create database structure and import `tbl_cron` data from [./tools/resources/database](./tools/resources/database).
|
||||
2. Download [GeoIP Database](https://dev.maxmind.com/geoip/geoip2/geolite2/) and place it to `./assets/geoip`. (see [./internal/repo/geoip.go](./internal/repo/geoip.go)).
|
||||
|
@ -18,7 +21,7 @@ To create admin user (for creating prober API key from Web-UI, execute `./bin/xm
|
|||
|
||||
Systemd example: [./tools/resources/init/xmr-nodes-server.service](./tools/resources/init/xmr-nodes-server.service).
|
||||
|
||||
For initial prober setup:
|
||||
### For initial prober setup:
|
||||
|
||||
1. Create API key for prober
|
||||
2. Copy `.env.example` to `.env` and edit it to match with prober environment.
|
||||
|
|
|
@ -81,8 +81,6 @@ func (repo *MoneroRepo) Node(id int) (MoneroNode, error) {
|
|||
type MoneroNodes struct {
|
||||
TotalRows int `json:"total_rows"`
|
||||
RowsPerPage int `json:"rows_per_page"`
|
||||
CurrentPage int `json:"current_page"`
|
||||
NextPage int `json:"next_page"`
|
||||
Items []*MoneroNode `json:"items"`
|
||||
}
|
||||
|
||||
|
@ -173,8 +171,6 @@ func (repo *MoneroRepo) Nodes(q MoneroQueryParams) (MoneroNodes, error) {
|
|||
defer row.Close()
|
||||
|
||||
nodes.RowsPerPage = q.RowsPerPage
|
||||
nodes.CurrentPage = q.Page
|
||||
nodes.NextPage = q.Page + 1
|
||||
|
||||
for row.Next() {
|
||||
node := MoneroNode{}
|
||||
|
|
Loading…
Reference in a new issue