(
&self,
plugin_id: u64,
new_source: String,
)
| 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 |
| 931 | script_dev_source = $2, |
| 932 | script_dev_version_updated_at = now() |
| 933 | WHERE id = $1 |
| 934 | RETURNING id, |
| 935 | created_at, |
| 936 | name, |
| 937 | short_description, |
| 938 | long_description, |
| 939 | is_published, |
| 940 | is_official, |
| 941 | plugin_kind, |
| 942 | current_version_number, |
| 943 | script_published_source, |
| 944 | script_published_version_updated_at, |
| 945 | script_dev_source, |
| 946 | script_dev_version_updated_at, |
| 947 | author_id, |
| 948 | is_public, |
| 949 | discord_thread_id, |
| 950 | installed_guilds, |
| 951 | installed_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, |
no test coverage detected