Skip to content

Commit

Permalink
show tot count at top, fix typo in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Kractero committed Jan 15, 2024
1 parent 33e2e79 commit 679586c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The API is built with Express and wraps the SQLite database containing trade rec
- **Optional Parameters:**
- `limit`: Limit the number of returned results (defaults to 1000).
- `sortval`: Sort results by `price` or `timestamp`, `timestamp` default.
- `sortorder`: Sorting order (`asc` or `desc`, `desc` defai;t).
- `sortorder`: Sorting order `asc` or `desc`, `desc` default.

- **Rate Limit:** 50 requests per 30 seconds.

Expand Down
2 changes: 1 addition & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ app.get('/', async (req, res) => {
const querystring = buildQS(req.query)
const nextPageUrl = `/trades?page=2&${querystring}`;
logger.info(`BASE ROUTE - ${querystring} / completed`)
res.render("index", { data: data, qs: req.query, qlery: nextPageUrl, total: tot, update: minutes(newestRecord.last_updated) })
res.render("index", { data: data, qs: req.query, qlery: nextPageUrl, total: tot, update: minutes(newestRecord.last_updated), count: newestRecord.records })
} catch (err) {
logger.error({
params: req.query
Expand Down
2 changes: 1 addition & 1 deletion views/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The API is built with Express and wraps the SQLite database containing trade rec
- **Optional Parameters:**
- `limit`: Limit the number of returned results (defaults to 1000).
- `sortval`: Sort results by `price` or `timestamp`, `timestamp` default.
- `sortorder`: Sorting order (`asc` or `desc`, `desc` defai;t).
- `sortorder`: Sorting order `asc` or `desc`, `desc` default.

- **Rate Limit:** 50 requests per 30 seconds.

Expand Down
7 changes: 5 additions & 2 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
<body class="font-main dark:bg-slate-900 dark:text-white" id="themeSwitcher">
<header class="flex items-center justify-center flex-col pt-40 mb-10">
<%- include('./partials/header'); %>
<p class="mt-4">
Data last modified <%= update %>
<p class="my-4">
Data last modified <%= update %>.
</p>
<p>
Counting <%= count.toLocaleString() %> trades since April 1st 2018.
</p>
</header>
<main>
Expand Down

0 comments on commit 679586c

Please sign in to comment.