mirror of
https://git.ethanthesleepy.one/ethanaobrien/ew.git
synced 2025-05-13 11:37:33 -05:00
Implement dummy /api/mission/receive
This commit is contained in:
parent
2115bbb08b
commit
28d1e01138
2 changed files with 16 additions and 0 deletions
|
@ -120,6 +120,9 @@ async fn mission(req: HttpRequest) -> HttpResponse { router::mission::mission(re
|
|||
#[get("/api/mission/clear")]
|
||||
async fn mission_clear(req: HttpRequest, body: String) -> HttpResponse { router::mission::clear(req, body) }
|
||||
|
||||
#[get("/api/mission/receive")]
|
||||
async fn mission_receive(req: HttpRequest, body: String) -> HttpResponse { router::mission::receive(req, body) }
|
||||
|
||||
#[get("/api/home")]
|
||||
async fn home(req: HttpRequest) -> HttpResponse { router::home::home(req) }
|
||||
|
||||
|
@ -217,6 +220,7 @@ async fn main() -> std::io::Result<()> {
|
|||
.service(friend)
|
||||
.service(mission)
|
||||
.service(mission_clear)
|
||||
.service(mission_receive)
|
||||
.service(home)
|
||||
.service(start_assethash)
|
||||
.service(user)
|
||||
|
|
|
@ -46,6 +46,18 @@ pub fn clear(req: HttpRequest, body: String) -> HttpResponse {
|
|||
global::send(resp)
|
||||
}
|
||||
|
||||
pub fn receive(_req: HttpRequest, _body: String) -> HttpResponse {
|
||||
//let key = global::get_login(req.headers(), &body);
|
||||
//let missions = userdata::get_acc_missions(&key);
|
||||
//let body = json::parse(&encryption::decrypt_packet(&body).unwrap()).unwrap();
|
||||
|
||||
//todo - give user rewards based off of cleared missions
|
||||
|
||||
let resp = object!{
|
||||
"code": 0,
|
||||
"server_time": global::timestamp(),
|
||||
"data": {
|
||||
"reward_list": []
|
||||
}
|
||||
};
|
||||
global::send(resp)
|
||||
|
|
Loading…
Add table
Reference in a new issue