refactor: rename fetch_one_with_member
Renamed to fetch_one_with_uuid
This commit is contained in:
parent
e9cc2a3f0e
commit
8d91ec78a6
3 changed files with 4 additions and 4 deletions
|
@ -34,7 +34,7 @@ pub async fn post(
|
|||
global_checks(&mut conn, &app_state.config, uuid).await?;
|
||||
|
||||
let member =
|
||||
Member::fetch_one_with_member(&mut conn, &app_state.cache_pool, None, member_uuid).await?;
|
||||
Member::fetch_one_with_uuid(&mut conn, &app_state.cache_pool, None, member_uuid).await?;
|
||||
|
||||
let caller = Member::check_membership(&mut conn, uuid, member.guild_uuid).await?;
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ pub async fn get(
|
|||
let me = Me::get(&mut conn, uuid).await?;
|
||||
|
||||
let member =
|
||||
Member::fetch_one_with_member(&mut conn, &app_state.cache_pool, Some(&me), member_uuid)
|
||||
Member::fetch_one_with_uuid(&mut conn, &app_state.cache_pool, Some(&me), member_uuid)
|
||||
.await?;
|
||||
Member::check_membership(&mut conn, uuid, member.guild_uuid).await?;
|
||||
|
||||
|
@ -51,7 +51,7 @@ pub async fn delete(
|
|||
let me = Me::get(&mut conn, uuid).await?;
|
||||
|
||||
let member =
|
||||
Member::fetch_one_with_member(&mut conn, &app_state.cache_pool, Some(&me), member_uuid)
|
||||
Member::fetch_one_with_uuid(&mut conn, &app_state.cache_pool, Some(&me), member_uuid)
|
||||
.await?;
|
||||
|
||||
let deleter = Member::check_membership(&mut conn, uuid, member.guild_uuid).await?;
|
||||
|
|
|
@ -185,7 +185,7 @@ impl Member {
|
|||
.await
|
||||
}
|
||||
|
||||
pub async fn fetch_one_with_member(
|
||||
pub async fn fetch_one_with_uuid(
|
||||
conn: &mut Conn,
|
||||
cache_pool: &redis::Client,
|
||||
me: Option<&Me>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue