Оно работает!

Почищу код позже...
This commit is contained in:
Shiroyasha 2024-05-17 11:00:37 +03:00
parent 3fd49300db
commit b280da2742
Signed by: shiroyashik
GPG key ID: E4953D3940D7860A
14 changed files with 659 additions and 114 deletions

30
src/info.rs Normal file
View file

@ -0,0 +1,30 @@
use axum::Json;
use serde_json::{json, Value};
pub async fn version() -> Json<Value> {
Json(json!({
"release": "1.7.1",
"prerelease": "1.7.2"
}))
}
pub async fn limits() -> Json<Value> {
Json(json!({
"rate": {
"pingSize": 1024,
"pingRate": 32, // TODO: Проверить
"equip": 1,
"download": 50,
"upload": 1
},
"limits": {
"maxAvatarSize": 100000,
"maxAvatars": 10,
"allowedBadges": {
"special": [0,0,0,0,0,0],
"pride": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
}
}
}))
}