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

Method create_image

components/stores/src/config.rs:1216–1231  ·  view source on GitHub ↗
(&self, create: CreateImage)

Source from the content-addressed store, hash-verified

1214 }
1215
1216 pub async fn create_image(&self, create: CreateImage) -> ConfigStoreResult<Uuid> {
1217 let res = sqlx::query!(
1218 "INSERT INTO images (uploaded_by, plugin_id, width, height, bytes, created_at)
1219 VALUES ($1, $2, $3, $4, $5, now())
1220 RETURNING id;",
1221 create.user_id as i64,
1222 create.plugin_id as i64,
1223 create.width as i32,
1224 create.height as i32,
1225 create.bytes,
1226 )
1227 .fetch_one(&self.pool)
1228 .await?;
1229
1230 Ok(res.id)
1231 }
1232
1233 pub async fn soft_delete_image(&self, _id: Uuid) -> ConfigStoreResult<Uuid> {
1234 todo!()

Callers 1

add_plugin_imageFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected