/// The position the authenticated user has on the statement
The position the authenticated user has on the statement
The position the authenticated user has on the statement
pub async fn my_position(
        &self,
        context: &async_graphql::Context<'_>,
    ) -> Result<Option<StatementPosition>> {
        let (_, token) = Context::parse(context)?;
        let user_id = require_valid_token(&token)?;
        for position in &self.user_positions {
            if position.user_id == user_id {
                return Ok(Some(position.clone()));
            }
        }
        Ok(None)
    }
pub async fn my_position ( & self , context : & async_graphql :: Context < ' _ > , ) -> Result < Option < StatementPosition > > { let ( _ , token ) = Context :: parse ( context ) ? ; let user_id = require_valid_token ( & token ) ? ; for position in & self . user_positions { if position . user_id == user_id { return Ok ( Some ( position . clone ( ) ) ) ; } } Ok ( None ) }
The position the authenticated user has on the statement
The position the authenticated user has on the statement
&self
context
&async_graphql::Context<'_>