Fix types and queries

This commit is contained in:
durch
2025-07-07 20:47:54 +02:00
parent fe2f4b039c
commit bc587b4658
3 changed files with 5 additions and 5 deletions
@@ -3,7 +3,7 @@
[package]
name = "nym-node-status-api"
version = "3.1.4"
version = "3.1.5"
authors.workspace = true
repository.workspace = true
homepage.workspace = true
@@ -442,7 +442,7 @@ pub(crate) struct NymNodeInsertRecord {
pub entry: Option<serde_json::Value>,
pub self_described: Option<serde_json::Value>,
pub bond_info: Option<serde_json::Value>,
pub last_updated_utc: String,
pub last_updated_utc: i64,
}
impl NymNodeInsertRecord {
@@ -451,7 +451,7 @@ impl NymNodeInsertRecord {
bond_info: Option<&NymNodeDetails>,
self_described: Option<&NymNodeDescription>,
) -> anyhow::Result<Self> {
let now = OffsetDateTime::now_utc().to_string();
let now = OffsetDateTime::now_utc().unix_timestamp();
// if bond info is missing, set stake to 0
let total_stake = bond_info
@@ -96,9 +96,9 @@ pub(crate) async fn assign_oldest_testrun(
SET
status = ?,
last_assigned_utc = ?
WHERE rowid =
WHERE id =
(
SELECT rowid
SELECT id
FROM testruns
WHERE status = ?
ORDER BY created_utc asc