match query to registry table

This commit is contained in:
Shadowy Super Coder
2024-06-21 18:39:05 -06:00
parent 4afd3c2322
commit 133dfd5063

View File

@@ -145,10 +145,10 @@ pub async fn get_version(
arch,
}: GetVersionParams,
) -> Result<BTreeMap<VersionString, OsVersionInfo>, Error> {
if let (Some(pool), Some(server_id), Some(arch)) = (ctx.pool, server_id, arch) {
let created_at = Utc::now().to_rfc3339();
if let (Some(pool), Some(server_id), Some(arch)) = (&ctx.pool, server_id, arch) {
let created_at = Utc::now();
query!("INSERT INTO user_activity (created_at, server_id, os_version, arch) VALUES ($1, $2, $3, $4)",
query!("INSERT INTO user_activity (created_at, server_id, arch) VALUES ($1, $2, $3)",
created_at,
server_id,
arch