Skip to content

Commit

Permalink
fix(backend): santitize api url before proceeding
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisDa committed May 10, 2023
1 parent 968d5f8 commit 80f62f9
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions apps/backend/src/importer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,9 @@ impl ImporterService {
input: DeployMediaTrackerImportInput,
) -> Result<String> {
let mut storage = self.import_media.clone();
let job = storage
.push(ImportMedia {
user_id,
input: input.clone(),
})
.await
.unwrap();
let mut input = input.clone();
input.api_url = input.api_url.trim_end_matches("/").to_owned();
let job = storage.push(ImportMedia { user_id, input }).await.unwrap();
Ok(job.to_string())
}

Expand Down

0 comments on commit 80f62f9

Please sign in to comment.