add: better quote post ui
This commit is contained in:
parent
fb2a9285d2
commit
2b91422d18
8 changed files with 138 additions and 102 deletions
|
@ -49,6 +49,13 @@ fn check_staff_badge(value: &Value, _: &HashMap<String, Value>) -> tera::Result<
|
|||
.into())
|
||||
}
|
||||
|
||||
fn check_banned(value: &Value, _: &HashMap<String, Value>) -> tera::Result<Value> {
|
||||
Ok(FinePermission::from_bits(value.as_u64().unwrap() as u32)
|
||||
.unwrap()
|
||||
.check_banned()
|
||||
.into())
|
||||
}
|
||||
|
||||
#[tokio::main(flavor = "multi_thread")]
|
||||
async fn main() {
|
||||
tracing_subscriber::fmt()
|
||||
|
@ -78,6 +85,7 @@ async fn main() {
|
|||
tera.register_filter("color", color_escape);
|
||||
tera.register_filter("has_supporter", check_supporter);
|
||||
tera.register_filter("has_staff_badge", check_staff_badge);
|
||||
tera.register_filter("has_banned", check_banned);
|
||||
|
||||
let client = Client::new();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue