feat: block and dangerous users

This commit is contained in:
2022-03-27 01:35:46 +08:00
parent b2cf8475c5
commit 5bef37cd62
8 changed files with 254 additions and 101 deletions

View File

@@ -12,6 +12,12 @@ use rocket::request::{FromRequest, Outcome, Request};
use rocket::response::{self, Responder};
use rocket::serde::json::{json, Value};
macro_rules! code0 {
() => (
Ok(json!({"code": 0}))
);
}
#[catch(401)]
pub fn catch_401_error() -> &'static str {
"未登录或token过期"