feat: audid log on invite creation
This commit is contained in:
parent
55ef6ddde2
commit
dee248e02d
1 changed files with 3 additions and 5 deletions
|
@ -10,11 +10,7 @@ use serde::Deserialize;
|
|||
use uuid::Uuid;
|
||||
|
||||
use crate::{
|
||||
AppState,
|
||||
api::v1::auth::CurrentUser,
|
||||
error::Error,
|
||||
objects::{Guild, Member, Permissions},
|
||||
utils::global_checks,
|
||||
api::v1::auth::CurrentUser, error::Error, objects::{AuditLog, AuditLogId, Guild, Member, Permissions}, utils::global_checks, AppState
|
||||
};
|
||||
|
||||
#[derive(Deserialize)]
|
||||
|
@ -62,5 +58,7 @@ pub async fn create(
|
|||
.create_invite(&mut conn, uuid, invite_request.custom_id.clone())
|
||||
.await?;
|
||||
|
||||
AuditLog::new(guild_uuid, AuditLogId::InviteCreate as i16, member.uuid, None, None, None, None, Some(invite.id.clone()), None, None).await.push(&mut conn).await?;
|
||||
|
||||
Ok((StatusCode::OK, Json(invite)))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue