feat: add global email verification check
This commit is contained in:
parent
29dbb085a2
commit
abfbaf8918
18 changed files with 106 additions and 63 deletions
|
@ -1,9 +1,5 @@
|
|||
use crate::{
|
||||
Data,
|
||||
api::v1::auth::check_access_token,
|
||||
error::Error,
|
||||
structs::{Member, Role},
|
||||
utils::get_auth_header,
|
||||
api::v1::auth::check_access_token, error::Error, structs::{Member, Role}, utils::{get_auth_header, global_checks}, Data
|
||||
};
|
||||
use ::uuid::Uuid;
|
||||
use actix_web::{HttpRequest, HttpResponse, get, web};
|
||||
|
@ -24,6 +20,8 @@ pub async fn get(
|
|||
|
||||
let uuid = check_access_token(auth_header, &mut conn).await?;
|
||||
|
||||
global_checks(&data, uuid).await?;
|
||||
|
||||
Member::fetch_one(&mut conn, uuid, guild_uuid).await?;
|
||||
|
||||
if let Ok(cache_hit) = data.get_cache_key(format!("{}", role_uuid)).await {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue