Copy config files around to prevent overwriting
This commit is contained in:
@ -68,8 +68,8 @@ pub async fn register_application_commands(
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
if Path::new("/etc/soundfx-rs/default.env").exists() {
|
||||
dotenv::from_path("/etc/soundfx-rs/default.env").unwrap();
|
||||
if Path::new("/etc/soundfx-rs/config.env").exists() {
|
||||
dotenv::from_path("/etc/soundfx-rs/config.env").unwrap();
|
||||
}
|
||||
|
||||
env_logger::init();
|
||||
|
@ -409,16 +409,9 @@ WHERE
|
||||
&self,
|
||||
db_pool: impl Executor<'_, Database = Database>,
|
||||
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
sqlx::query!(
|
||||
"
|
||||
DELETE
|
||||
FROM sounds
|
||||
WHERE id = ?
|
||||
",
|
||||
self.id
|
||||
)
|
||||
.execute(db_pool)
|
||||
.await?;
|
||||
sqlx::query!("DELETE FROM sounds WHERE id = ?", self.id)
|
||||
.execute(db_pool)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user