You've already forked AstralRinth
forked from didirus/AstralRinth
Add dependencies to search (#578)
* Add dependencies to search * add attrs for faceting * run prepare * Add user data route from token * update to 24hrs * Fix report bugs
This commit is contained in:
@@ -35,27 +35,18 @@ impl ResponseError for ARError {
|
||||
reset,
|
||||
} => {
|
||||
let mut response = actix_web::HttpResponse::TooManyRequests();
|
||||
response.insert_header((
|
||||
"x-ratelimit-limit",
|
||||
max_requests.to_string(),
|
||||
));
|
||||
response.insert_header((
|
||||
"x-ratelimit-remaining",
|
||||
remaining.to_string(),
|
||||
));
|
||||
response
|
||||
.insert_header(("x-ratelimit-reset", reset.to_string()));
|
||||
response.insert_header(("x-ratelimit-limit", max_requests.to_string()));
|
||||
response.insert_header(("x-ratelimit-remaining", remaining.to_string()));
|
||||
response.insert_header(("x-ratelimit-reset", reset.to_string()));
|
||||
response.json(ApiError {
|
||||
error: "ratelimit_error",
|
||||
description: &self.to_string(),
|
||||
})
|
||||
}
|
||||
_ => actix_web::HttpResponse::build(self.status_code()).json(
|
||||
ApiError {
|
||||
error: "ratelimit_error",
|
||||
description: &self.to_string(),
|
||||
},
|
||||
),
|
||||
_ => actix_web::HttpResponse::build(self.status_code()).json(ApiError {
|
||||
error: "ratelimit_error",
|
||||
description: &self.to_string(),
|
||||
}),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user