Add dummy getregisteredplatformlist endpoint

This commit is contained in:
Ethan O'Brien 2024-05-04 12:16:41 -05:00
parent 26828cfa86
commit 9c616130ba
2 changed files with 17 additions and 0 deletions

View file

@ -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)

View file

@ -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();