Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
“Giems” committed Mar 6, 2024
1 parent c25f66e commit fa4094d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
3 changes: 3 additions & 0 deletions database/bindings/Subscription.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export interface Subscription { subscription_type: string, valid_from: bigint, valid_till: bigint, }
2 changes: 1 addition & 1 deletion database/migrations/0004_registered_apps.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CREATE TABLE registered_apps(
whitelisted_domains TEXT [] NOT NULL,
ack_public_keys TEXT [] NOT NULL,
email TEXT,
registration_timestamp BIGINT NOT NULL,
registration_timestamp TIMESTAMPTZ NOT NULL,
pass_hash TEXT
);

Expand Down
12 changes: 6 additions & 6 deletions database/src/aggregated_views_queries/requests_stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ mod test {
},
tables::{
registered_app::table_struct::DbRegisteredApp, requests::table_struct::Request,
sessions::table_struct::DbNcSession,
sessions::table_struct::DbNcSession, utils::to_microsecond_precision,
},
};
use sqlx::types::chrono::{DateTime, Utc};
Expand Down Expand Up @@ -199,7 +199,7 @@ mod test {
network: "test_network".to_string(),
client_profile_id: None,
client: None,
session_open_timestamp: DateTime::from(Utc::now()),
session_open_timestamp: to_microsecond_precision(&Utc::now()),
session_close_timestamp: None,
};

Expand Down Expand Up @@ -236,7 +236,7 @@ mod test {
app_id: app_id.to_string(),
session_id: "test_session_id".to_string(),
network: "test_network".to_string(),
creation_timestamp: creation_time,
creation_timestamp: to_microsecond_precision(&creation_time),
request_status: status,
request_type: "test_request_type".to_string(),
};
Expand Down Expand Up @@ -319,7 +319,7 @@ mod test {
subscription: None,
ack_public_keys: vec!["test_key".to_string()],
email: None,
registration_timestamp: Utc::now(),
registration_timestamp: to_microsecond_precision(&Utc::now()),
pass_hash: None,
};
db_arc.register_new_app(&app).await.unwrap();
Expand All @@ -341,7 +341,7 @@ mod test {
network: "test_network".to_string(),
client_profile_id: None,
client: None,
session_open_timestamp: DateTime::from(Utc::now()),
session_open_timestamp: to_microsecond_precision(&Utc::now()),
session_close_timestamp: None,
};

Expand All @@ -365,7 +365,7 @@ mod test {
app_id: app_id.to_string(),
session_id: "test_session_id".to_string(),
network: "test_network".to_string(),
creation_timestamp: creation_time,
creation_timestamp: to_microsecond_precision(&creation_time),
request_status: RequestStatus::Pending,
request_type: "test_request_type".to_string(),
};
Expand Down

0 comments on commit fa4094d

Please sign in to comment.