forked from jmug/stoatchat
Start moving to Rocket 0.5.0
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
use crate::database::*;
|
||||
use crate::util::result::Result;
|
||||
|
||||
use rocket_contrib::json::JsonValue;
|
||||
use rocket::serde::json::Value;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize, Debug, Clone)]
|
||||
@@ -26,7 +26,7 @@ pub enum InviteResponse {
|
||||
}
|
||||
|
||||
#[get("/<target>")]
|
||||
pub async fn req(target: Ref) -> Result<JsonValue> {
|
||||
pub async fn req(target: Ref) -> Result<Value> {
|
||||
let target = target.fetch_invite().await?;
|
||||
|
||||
match target {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use crate::database::*;
|
||||
use crate::util::result::Result;
|
||||
|
||||
use rocket_contrib::json::JsonValue;
|
||||
use rocket::serde::json::Value;
|
||||
|
||||
#[post("/<target>")]
|
||||
pub async fn req(user: User, target: Ref) -> Result<JsonValue> {
|
||||
pub async fn req(user: User, target: Ref) -> Result<Value> {
|
||||
let target = target.fetch_invite().await?;
|
||||
|
||||
match target {
|
||||
|
||||
Reference in New Issue
Block a user