(
config: &DiscordConfig,
logged_in_user: Option<&CurrentUser>,
plugin: &Plugin,
)
| 352 | } |
| 353 | |
| 354 | pub async fn fetch_plugin_author( |
| 355 | config: &DiscordConfig, |
| 356 | logged_in_user: Option<&CurrentUser>, |
| 357 | plugin: &Plugin, |
| 358 | ) -> ApiResult<PluginResponse> { |
| 359 | let user = fetch_discord_user(config, logged_in_user, plugin.author_id).await?; |
| 360 | let is_staff = config.owners.iter().any(|v| v.id == plugin.author_id); |
| 361 | |
| 362 | Ok(PluginResponse { |
| 363 | plugin: plugin.clone(), |
| 364 | author: User { |
| 365 | inner: user, |
| 366 | is_bl_staff: is_staff, |
| 367 | is_bl_trusted: is_staff, |
| 368 | }, |
| 369 | }) |
| 370 | } |
| 371 | |
| 372 | pub async fn fetch_plugin_authors( |
| 373 | config: &DiscordConfig, |
no test coverage detected