feat: add global email verification check
This commit is contained in:
parent
29dbb085a2
commit
abfbaf8918
18 changed files with 106 additions and 63 deletions
|
@ -3,7 +3,7 @@ use actix_web::{HttpRequest, HttpResponse, get, post, web};
|
|||
use serde::Deserialize;
|
||||
|
||||
use crate::{
|
||||
api::v1::auth::check_access_token, error::Error, structs::{Member, Role}, utils::{get_auth_header, order_by_is_above}, Data
|
||||
api::v1::auth::check_access_token, error::Error, structs::{Member, Role}, utils::{get_auth_header, global_checks, order_by_is_above}, Data
|
||||
};
|
||||
|
||||
pub mod uuid;
|
||||
|
@ -64,6 +64,8 @@ pub async fn create(
|
|||
|
||||
let uuid = check_access_token(auth_header, &mut conn).await?;
|
||||
|
||||
global_checks(&data, uuid).await?;
|
||||
|
||||
Member::fetch_one(&mut conn, uuid, guild_uuid).await?;
|
||||
|
||||
// FIXME: Logic to check permissions, should probably be done in utils.rs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue