WIP: Audit Logs #45

Draft
baaboe wants to merge 13 commits from wip/auditlog into main
Showing only changes of commit d84b7cf126 - Show all commits

View file

@ -10,11 +10,7 @@ use axum::{
use serde::Deserialize;
use crate::{
AppState,
api::v1::auth::CurrentUser,
error::Error,
objects::{Channel, Member, Permissions},
utils::{CacheFns, global_checks, order_by_is_above},
api::v1::auth::CurrentUser, error::Error, objects::{AuditLog, AuditLogId, Channel, Member, Permissions}, utils::{global_checks, order_by_is_above, CacheFns}, AppState
};
#[derive(Deserialize)]
@ -83,5 +79,7 @@ pub async fn create(
)
.await?;
AuditLog::new(guild_uuid, AuditLogId::ChannelCreate as i16, member.uuid, Some(channel.uuid), None, None, None, Some(channel.name.clone()), None, None).await.push(&mut conn).await?;
Ok((StatusCode::OK, Json(channel)))
}