Skip to content

Commit 09f8ba3

Browse files
committed
fix updates not working for android32 and 64
1 parent 918def5 commit 09f8ba3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/endpoints/mods.rs

+4
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ pub async fn get_mod_updates(
136136
) -> Result<impl Responder, ApiError> {
137137
let mut pool = data.db.acquire().await.or(Err(ApiError::DbAcquireError))?;
138138

139+
if query.platform == VerPlatform::Android || query.platform == VerPlatform::Mac {
140+
return Err(ApiError::BadRequest("Invalid platform. Use android32 / android64 for android and mac-intel / mac-arm for mac".to_string()));
141+
}
142+
139143
let ids = query
140144
.ids
141145
.split(';')

src/types/models/mod_gd_version.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,10 @@ impl FromStr for GDVersionEnum {
5252
pub enum VerPlatform {
5353
#[sqlx(skip)]
5454
Android,
55-
#[serde(skip_deserializing)]
5655
Android32,
57-
#[serde(skip_deserializing)]
5856
Android64,
5957
Ios,
58+
#[sqlx(skip)]
6059
Mac,
6160
#[serde(rename = "mac-arm")]
6261
#[sqlx(rename = "mac-arm")]

0 commit comments

Comments
 (0)