feat: implement OpenAPI spec for bots and root

This commit is contained in:
Paul Makles
2022-03-18 21:22:31 +00:00
parent a0926eea32
commit 14e17b10c0
14 changed files with 290 additions and 63 deletions

View File

@@ -4,6 +4,10 @@ use revolt_quark::{
};
use rocket::serde::json::Json;
/// # Fetch Bot
///
/// Fetch details of a bot you own by its id.
#[openapi(tag = "Bots")]
#[get("/<target>")]
pub async fn fetch_bot(db: &Db, user: User, target: Ref) -> Result<Json<Bot>> {
if user.bot.is_some() {