Start moving to Rocket 0.5.0

This commit is contained in:
Paul
2021-08-03 14:40:07 +01:00
committed by Paul Makles
parent 33262cc703
commit 9fec4e48c0
62 changed files with 821 additions and 421 deletions

View File

@@ -3,7 +3,7 @@ use crate::util::result::{Error, Result};
use mongodb::bson::doc;
use nanoid::nanoid;
use rocket_contrib::json::JsonValue;
use rocket::serde::json::Value;
lazy_static! {
static ref ALPHABET: [char; 54] = [
@@ -14,7 +14,7 @@ lazy_static! {
}
#[post("/<target>/invites")]
pub async fn req(user: User, target: Ref) -> Result<JsonValue> {
pub async fn req(user: User, target: Ref) -> Result<Value> {
let target = target.fetch_channel().await?;
let perm = permissions::PermissionCalculator::new(&user)
.with_channel(&target)