From b6546793f665613e95c6602645855809e6fb988a Mon Sep 17 00:00:00 2001 From: Ethan O'Brien <77750390+ethanaobrien@users.noreply.github.com> Date: Tue, 2 Apr 2024 12:35:00 -0500 Subject: [PATCH] Add iOS global asset hash --- src/router/global.rs | 5 +++-- src/router/start.rs | 13 ++++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/router/global.rs b/src/router/global.rs index 45c57ba..ae8d937 100644 --- a/src/router/global.rs +++ b/src/router/global.rs @@ -7,8 +7,9 @@ use actix_web::{ use std::time::{SystemTime, UNIX_EPOCH}; use base64::{Engine as _, engine::general_purpose}; -pub const ASSET_VERSION: &str = "13177023d4b7ad41ff52af4cefba5c55"; -pub const ASSET_HASH: &str = "6a6f3be1da2c3734386a1832e251451a"; +pub const ASSET_VERSION: &str = "13177023d4b7ad41ff52af4cefba5c55"; +pub const ASSET_HASH_ANDROID: &str = "017ec1bcafbeea6a7714f0034b15bd0f"; +pub const ASSET_HASH_IOS: &str = "466d4616d14a8d8a842de06426e084c2"; pub const ASSET_VERSION_JP: &str = "4c921d2443335e574a82e04ec9ea243c"; pub const ASSET_HASH_ANDROID_JP: &str = "67f8f261c16b3cca63e520a25aad6c1c"; diff --git a/src/router/start.rs b/src/router/start.rs index 7c21c74..bda5695 100644 --- a/src/router/start.rs +++ b/src/router/start.rs @@ -22,8 +22,11 @@ pub fn asset_hash(req: HttpRequest, body: String) -> HttpResponse { global::ASSET_HASH_IOS_JP } } else { - //todo - ios - global::ASSET_HASH + if android { + global::ASSET_HASH_ANDROID + } else { + global::ASSET_HASH_IOS + } }; let resp = object!{ @@ -58,7 +61,11 @@ pub fn start(req: HttpRequest, body: String) -> HttpResponse { global::ASSET_HASH_IOS_JP } } else { - global::ASSET_HASH + if android { + global::ASSET_HASH_ANDROID + } else { + global::ASSET_HASH_IOS + } }; userdata::save_acc(&key, user);