use crate::error::Result;
use axum::Json;
use serde_json::json;

pub async fn android_update() -> Result<Json<serde_json::Value>> {
    let response = json!({
        "page": 1,
        "per_page": 15,
        "total_pages": 1,
        "total_items": 1,
        "items": [{
            "id": "legacy_update_bridge",
            "collection_id": "rtsda_android_collection",
            "collection_name": "rtsda_android",
            "created": "2025-06-30T04:00:00.000Z",
            "updated": "2025-06-30T04:00:00.000Z",
            "version_name": "1.0",
            "version_code": 8,
            "update_required": true,
            "update_description": "✅ Backend migration completed\n✅ All features restored after server transition\n✅ App now fully functional on new infrastructure\n⚙️ To Install This Update: Due to Android's requirements you will need to uninstall the old version and reinstall this new version",
            "apkfile": "current"
        }]
    });

    Ok(Json(response))
}
