fix: use str instead of string in add_media method

This commit is contained in:
Akulij 2025-04-10 21:53:15 +09:00
parent e46ba0dbbf
commit cc351a0a9b

View File

@ -243,8 +243,8 @@ impl DB {
pub async fn add_media( pub async fn add_media(
&mut self, &mut self,
literal: &str, literal: &str,
mediatype: String, mediatype: &str,
fileid: String, fileid: &str,
) -> Result<Media, Box<dyn std::error::Error>> { ) -> Result<Media, Box<dyn std::error::Error>> {
use self::schema::media::dsl::*; use self::schema::media::dsl::*;
let conn = &mut self.pool.get().await.unwrap(); let conn = &mut self.pool.get().await.unwrap();