(
conn: &mut PgConnection,
plugin_id: u64,
)
| 151 | } |
| 152 | |
| 153 | async fn inner_get_plugin( |
| 154 | conn: &mut PgConnection, |
| 155 | plugin_id: u64, |
| 156 | ) -> ConfigStoreResult<Plugin> { |
| 157 | let db_plugin = sqlx::query_as!( |
| 158 | DbPlugin, |
| 159 | r#"SELECT id, |
| 160 | created_at, |
| 161 | name, |
| 162 | short_description, |
| 163 | long_description, |
| 164 | is_published, |
| 165 | is_official, |
| 166 | plugin_kind, |
| 167 | current_version_number, |
| 168 | script_published_source, |
| 169 | script_published_version_updated_at, |
| 170 | script_dev_source, |
| 171 | script_dev_version_updated_at, |
| 172 | author_id, |
| 173 | is_public, |
| 174 | discord_thread_id, |
| 175 | installed_guilds, |
| 176 | installed_guilds_updated_at |
| 177 | FROM plugins WHERE id = $1"#, |
| 178 | plugin_id as i64, |
| 179 | ) |
| 180 | .fetch_optional(&mut *conn) |
| 181 | .await? |
| 182 | .ok_or(ConfigStoreError::PluginNotFound(plugin_id))?; |
| 183 | |
| 184 | let images = Self::get_plugin_images_with_conn(conn, plugin_id).await?; |
| 185 | |
| 186 | Ok(PluginAndImages(db_plugin, images).into()) |
| 187 | } |
| 188 | |
| 189 | async fn inner_upsert_plugin_image( |
| 190 | &self, |
nothing calls this directly
no test coverage detected