mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Add dummy sif/sifas migrate endpoints
This commit is contained in:
parent
b7d4f21e25
commit
26828cfa86
2 changed files with 33 additions and 0 deletions
|
@ -241,6 +241,12 @@ async fn exchange(req: HttpRequest) -> HttpResponse { router::exchange::exchange
|
||||||
#[post("/api/exchange")]
|
#[post("/api/exchange")]
|
||||||
async fn exchange_post(req: HttpRequest, body: String) -> HttpResponse { router::exchange::exchange_post(req, body) }
|
async fn exchange_post(req: HttpRequest, body: String) -> HttpResponse { router::exchange::exchange_post(req, body) }
|
||||||
|
|
||||||
|
#[post("/api/user/sif/migrate")]
|
||||||
|
async fn sif_migrate(req: HttpRequest, body: String) -> HttpResponse { router::user::sif_migrate(req, body) }
|
||||||
|
|
||||||
|
#[post("/api/user/ss/migrate")]
|
||||||
|
async fn sifas_migrate(req: HttpRequest, body: String) -> HttpResponse { router::user::sifas_migrate(req, body) }
|
||||||
|
|
||||||
|
|
||||||
#[post("/api/webui/login")]
|
#[post("/api/webui/login")]
|
||||||
async fn webui_login(req: HttpRequest, body: String) -> HttpResponse { router::webui::login(req, body) }
|
async fn webui_login(req: HttpRequest, body: String) -> HttpResponse { router::webui::login(req, body) }
|
||||||
|
@ -294,6 +300,8 @@ async fn main() -> std::io::Result<()> {
|
||||||
println!("Request: {}", req.path());
|
println!("Request: {}", req.path());
|
||||||
srv.call(req)
|
srv.call(req)
|
||||||
})
|
})
|
||||||
|
.service(sifas_migrate)
|
||||||
|
.service(sif_migrate)
|
||||||
.service(exchange_post)
|
.service(exchange_post)
|
||||||
.service(exchange)
|
.service(exchange)
|
||||||
.service(serial_code)
|
.service(serial_code)
|
||||||
|
|
|
@ -360,6 +360,31 @@ pub fn sif(req: HttpRequest) -> HttpResponse {
|
||||||
global::send(resp)
|
global::send(resp)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn sifas_migrate(_req: HttpRequest, _body: String) -> HttpResponse {
|
||||||
|
let resp = object!{
|
||||||
|
"code": 0,
|
||||||
|
"server_time": global::timestamp(),
|
||||||
|
"data": {
|
||||||
|
"ss_migrate_status": 1,
|
||||||
|
"user": null,
|
||||||
|
"gift_list": null,
|
||||||
|
"lock_remain_time": null
|
||||||
|
}
|
||||||
|
};
|
||||||
|
global::send(resp)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn sif_migrate(_req: HttpRequest, _body: String) -> HttpResponse {
|
||||||
|
let resp = object!{
|
||||||
|
"code": 0,
|
||||||
|
"server_time": global::timestamp(),
|
||||||
|
"data": {
|
||||||
|
"sif_migrate_status": 38
|
||||||
|
}
|
||||||
|
};
|
||||||
|
global::send(resp)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn initialize(req: HttpRequest, body: String) -> HttpResponse {
|
pub fn initialize(req: HttpRequest, body: String) -> HttpResponse {
|
||||||
let key = global::get_login(req.headers(), &body);
|
let key = global::get_login(req.headers(), &body);
|
||||||
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
||||||
|
|
Loading…
Add table
Reference in a new issue