feat: strongly type and remaining routes
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
use revolt_quark::{models::User, Ref, Result};
|
||||
|
||||
use rocket::serde::json::Value;
|
||||
use rocket::serde::json::Json;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
/// # Token Response
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct CreateVoiceUserResponse {
|
||||
/// # Voice Server Token Response
|
||||
#[derive(Serialize, Deserialize, JsonSchema)]
|
||||
pub struct CreateVoiceUserResponse {
|
||||
/// Token for authenticating with the voice server
|
||||
token: String,
|
||||
}
|
||||
@@ -15,6 +15,6 @@ struct CreateVoiceUserResponse {
|
||||
/// Asks the voice server for a token to join the call.
|
||||
#[openapi(tag = "Voice")]
|
||||
#[post("/<_target>/join_call")]
|
||||
pub async fn req(_user: User, _target: Ref) -> Result<Value> {
|
||||
pub async fn req(_user: User, _target: Ref) -> Result<Json<CreateVoiceUserResponse>> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user