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

Method update_script_plugin_dev_version

components/stores/src/config.rs:923–962  ·  view source on GitHub ↗
(
        &self,
        plugin_id: u64,
        new_source: String,
    )

Source from the content-addressed store, hash-verified

921 }
922
923 pub async fn update_script_plugin_dev_version(
924 &self,
925 plugin_id: u64,
926 new_source: String,
927 ) -> ConfigStoreResult<Plugin> {
928 let res = sqlx::query_as!(
929 DbPlugin,
930 r#"UPDATE plugins SET
931script_dev_source = $2,
932script_dev_version_updated_at = now()
933WHERE id = $1
934RETURNING id,
935created_at,
936name,
937short_description,
938long_description,
939is_published,
940is_official,
941plugin_kind,
942current_version_number,
943script_published_source,
944script_published_version_updated_at,
945script_dev_source,
946script_dev_version_updated_at,
947author_id,
948is_public,
949discord_thread_id,
950installed_guilds,
951installed_guilds_updated_at
952"#,
953 plugin_id as i64,
954 new_source,
955 )
956 .fetch_one(&self.pool)
957 .await?;
958
959 let images = self.get_plugin_images_with_pool(plugin_id).await?;
960
961 Ok(PluginAndImages(res, images).into())
962 }
963
964 pub async fn publish_script_plugin_version(
965 &self,

Callers 1

update_plugin_dev_sourceFunction · 0.80

Calls 2

PluginAndImagesClass · 0.85

Tested by

no test coverage detected