MCPcopy Create free account
hub / github.com/Botloader/botloader / inner_upsert_plugin_image

Method inner_upsert_plugin_image

components/stores/src/config.rs:189–210  ·  view source on GitHub ↗
(
        &self,
        plugin_id: u64,
        image: CreateUpdatePluginImage,
    )

Source from the content-addressed store, hash-verified

187 }
188
189 async fn inner_upsert_plugin_image(
190 &self,
191 plugin_id: u64,
192 image: CreateUpdatePluginImage,
193 ) -> ConfigStoreResult<()> {
194 sqlx::query!(
195 "INSERT INTO plugin_images (plugin_id, image_id, created_at, description, position, \
196 kind)
197 VALUES ($1, $2, now(), $3, $4, $5)
198 ON CONFLICT (plugin_id, image_id) DO UPDATE SET
199 description = $3;",
200 plugin_id as i64,
201 image.image_id,
202 image.description,
203 image.position,
204 i32::from(image.kind),
205 )
206 .execute(&self.pool)
207 .await?;
208
209 Ok(())
210 }
211
212 pub async fn get_user_by_stripe_customer_id(
213 &self,

Callers 1

upsert_plugin_imageMethod · 0.80

Calls 1

executeMethod · 0.80

Tested by

no test coverage detected