update code to be inline with reviews
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use revolt_quark::{Db, Ref, Result, EmptyResponse, models::User, perms, Permission};
|
||||
|
||||
/// # Deletes a webhook with a token
|
||||
/// # Deletes a webhook
|
||||
///
|
||||
/// deletes a webhook with a token
|
||||
/// deletes a webhook
|
||||
#[openapi(tag = "Webhooks")]
|
||||
#[delete("/<target>")]
|
||||
pub async fn req(db: &Db, user: User, target: Ref) -> Result<EmptyResponse> {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use revolt_quark::{Db, Ref, Result, EmptyResponse, Error};
|
||||
|
||||
/// # Deletes a webhook with a token
|
||||
/// # Deletes a webhook
|
||||
///
|
||||
/// deletes a webhook with a token
|
||||
#[openapi(tag = "Webhooks")]
|
||||
|
||||
@@ -15,7 +15,7 @@ pub struct WebhookEditBody {
|
||||
remove: Vec<FieldsWebhook>
|
||||
}
|
||||
|
||||
/// # Edits a webhook with a token
|
||||
/// # Edits a webhook
|
||||
///
|
||||
/// edits a webhook with a token
|
||||
#[openapi(tag = "Webhooks")]
|
||||
|
||||
@@ -737,7 +737,7 @@ fn convert_event(data: &str, event_name: &str) -> Result<Event> {
|
||||
})
|
||||
}
|
||||
|
||||
/// # executes a webhook specific to github
|
||||
/// # Executes a webhook specific to github
|
||||
///
|
||||
/// executes a webhook specific to github and sends a message containg the relavent info about the event
|
||||
#[openapi(tag = "Webhooks")]
|
||||
|
||||
@@ -16,7 +16,7 @@ pub struct WebhookData {
|
||||
pub channel: String,
|
||||
}
|
||||
|
||||
/// # gets a webhook
|
||||
/// # Gets a webhook
|
||||
///
|
||||
/// gets a webhook
|
||||
#[openapi(tag = "Webhooks")]
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use revolt_quark::{Db, Ref, Result, Error, models::Webhook};
|
||||
use rocket::serde::json::Json;
|
||||
|
||||
/// # gets a webhook
|
||||
/// # Gets a webhook
|
||||
///
|
||||
/// gets a webhook
|
||||
/// gets a webhook with a token
|
||||
#[openapi(tag = "Webhooks")]
|
||||
#[get("/<target>/<token>")]
|
||||
pub async fn req(db: &Db, target: Ref, token: String) -> Result<Json<Webhook>> {
|
||||
|
||||
Reference in New Issue
Block a user