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:
@@ -49,14 +49,12 @@ pub async fn images_add(
|
||||
) -> Result<HttpResponse, ApiError> {
|
||||
let mut context = ImageContext::from_str(&data.context, None);
|
||||
|
||||
let scopes = vec![context.relevant_scope()];
|
||||
|
||||
let user = get_user_from_headers(
|
||||
&req,
|
||||
&**pool,
|
||||
&redis,
|
||||
&session_queue,
|
||||
Some(&scopes),
|
||||
context.relevant_scope(),
|
||||
)
|
||||
.await?
|
||||
.1;
|
||||
|
||||
Reference in New Issue
Block a user