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

@@ -82,7 +82,7 @@ pub async fn playtimes_get(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::ANALYTICS]),
Scopes::ANALYTICS,
)
.await
.map(|x| x.1)?;
@@ -151,7 +151,7 @@ pub async fn views_get(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::ANALYTICS]),
Scopes::ANALYTICS,
)
.await
.map(|x| x.1)?;
@@ -220,7 +220,7 @@ pub async fn downloads_get(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::ANALYTICS]),
Scopes::ANALYTICS,
)
.await
.map(|x| x.1)?;
@@ -289,7 +289,7 @@ pub async fn revenue_get(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::PAYOUTS_READ]),
Scopes::PAYOUTS_READ,
)
.await
.map(|x| x.1)?;
@@ -430,7 +430,7 @@ pub async fn countries_downloads_get(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::ANALYTICS]),
Scopes::ANALYTICS,
)
.await
.map(|x| x.1)?;
@@ -503,7 +503,7 @@ pub async fn countries_views_get(
&**pool,
&redis,
&session_queue,
Some(&[Scopes::ANALYTICS]),
Scopes::ANALYTICS,
)
.await
.map(|x| x.1)?;