fix: use null for comments

This commit is contained in:
2022-03-16 01:58:21 +08:00
parent e373ac9ab6
commit fe8778380c
2 changed files with 16 additions and 17 deletions

View File

@@ -3,14 +3,11 @@ use crate::random_hasher::RandomHasher;
use rocket::http::Status;
use rocket::request::{self, FromRequest, Request};
use rocket::response::{self, Responder};
use rocket::serde::json::{json, Value};
use rocket::serde::json::json;
#[catch(401)]
pub fn catch_401_error() -> Value {
json!({
"code": -1,
"msg": "未登录或token过期"
})
pub fn catch_401_error() -> &'static str {
"未登录或token过期"
}
pub struct CurrentUser {