Make get_user_from_headers and check_is_moderator_from_headers take in a bitflag of Scopes rather than a slice of Scopes (#3765)

This commit is contained in:
Josiah Glosson
2025-06-09 14:29:32 -05:00
committed by GitHub
parent 06f1df1995
commit 3afb682fc6
28 changed files with 161 additions and 157 deletions

View File

@@ -102,7 +102,7 @@ pub async fn subscriptions(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::SESSION_ACCESS]),
Scopes::SESSION_ACCESS,
)
.await?
.1;
@@ -161,7 +161,7 @@ pub async fn refund_charge(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::SESSION_ACCESS]),
Scopes::SESSION_ACCESS,
)
.await?
.1;
@@ -325,7 +325,7 @@ pub async fn edit_subscription(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::SESSION_ACCESS]),
Scopes::SESSION_ACCESS,
)
.await?
.1;
@@ -585,7 +585,7 @@ pub async fn user_customer(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::SESSION_ACCESS]),
Scopes::SESSION_ACCESS,
)
.await?
.1;
@@ -623,7 +623,7 @@ pub async fn charges(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::SESSION_ACCESS]),
Scopes::SESSION_ACCESS,
)
.await?
.1;
@@ -682,7 +682,7 @@ pub async fn add_payment_method_flow(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::SESSION_ACCESS]),
Scopes::SESSION_ACCESS,
)
.await?
.1;
@@ -736,7 +736,7 @@ pub async fn edit_payment_method(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::SESSION_ACCESS]),
Scopes::SESSION_ACCESS,
)
.await?
.1;
@@ -805,7 +805,7 @@ pub async fn remove_payment_method(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::SESSION_ACCESS]),
Scopes::SESSION_ACCESS,
)
.await?
.1;
@@ -892,7 +892,7 @@ pub async fn payment_methods(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::SESSION_ACCESS]),
Scopes::SESSION_ACCESS,
)
.await?
.1;
@@ -1089,7 +1089,7 @@ pub async fn initiate_payment(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::SESSION_ACCESS]),
Scopes::SESSION_ACCESS,
)
.await?
.1;