feat: Working server/comment routes
This commit is contained in:
@@ -2,7 +2,7 @@ use std::str::FromStr;
|
||||
|
||||
use revolt_result::Result;
|
||||
#[cfg(feature = "rocket-impl")]
|
||||
use rocket::request::FromParam;
|
||||
use rocket::{form::FromFormField, request::FromParam};
|
||||
#[cfg(feature = "rocket-impl")]
|
||||
use schemars::{
|
||||
schema::{InstanceType, Schema, SchemaObject, SingleOrVec},
|
||||
@@ -132,3 +132,10 @@ impl<'a> JsonSchema for Reference<'a> {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "rocket-impl")]
|
||||
impl<'r> FromFormField<'r> for Reference {
|
||||
fn from_value(field: rocket::form::ValueField<'r>) -> rocket::form::Result<'r, Self> {
|
||||
Ok(Reference::from_unchecked(field.value.into()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user