diff --git a/src/main.rs b/src/main.rs index 5c4fa91..3b745e1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -247,6 +247,9 @@ async fn sif_migrate(req: HttpRequest, body: String) -> HttpResponse { router::u #[post("/api/user/ss/migrate")] async fn sifas_migrate(req: HttpRequest, body: String) -> HttpResponse { router::user::sifas_migrate(req, body) } +#[post("/api/user/getregisteredplatformlist")] +async fn getregisteredplatformlist(req: HttpRequest, body: String) -> HttpResponse { router::user::getregisteredplatformlist(req, body) } + #[post("/api/webui/login")] async fn webui_login(req: HttpRequest, body: String) -> HttpResponse { router::webui::login(req, body) } @@ -383,6 +386,7 @@ async fn main() -> std::io::Result<()> { .service(migration) .service(gglrequestmigrationcode) .service(gglverifymigrationcode) + .service(getregisteredplatformlist) .service(serial_code_events) .service(gift) .service(gift_get) diff --git a/src/router/user.rs b/src/router/user.rs index 204688d..a9ffecd 100644 --- a/src/router/user.rs +++ b/src/router/user.rs @@ -385,6 +385,19 @@ pub fn sif_migrate(_req: HttpRequest, _body: String) -> HttpResponse { global::send(resp) } +pub fn getregisteredplatformlist(_req: HttpRequest, _body: String) -> HttpResponse { + let resp = object!{ + "code": 0, + "server_time": global::timestamp(), + "data": { + "google": 0, + "apple": 0, + "twitter": 0 + } + }; + global::send(resp) +} + pub fn initialize(req: HttpRequest, body: String) -> HttpResponse { let key = global::get_login(req.headers(), &body); let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();