Merge pull request #223 from BillionClaw/clawoss/fix/shared-link-404

fix(share): correct shared link URL to include /api prefix
This commit is contained in:
Dionisio Pozo
2026-03-17 09:50:15 +01:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ pub struct UpdateShareDto {
/// Extension methods to convert between DTOs and domain entities /// Extension methods to convert between DTOs and domain entities
impl ShareDto { impl ShareDto {
pub fn from_entity(share: &Share, base_url: &str) -> Self { pub fn from_entity(share: &Share, base_url: &str) -> Self {
let url = format!("{}/s/{}", base_url, share.token()); let url = format!("{}/api/s/{}", base_url, share.token());
Self { Self {
id: share.id().to_string(), id: share.id().to_string(),
+1 -1
View File
@@ -1135,6 +1135,6 @@ mod tests {
assert_eq!(share_dto.item_id, "test_file_id"); assert_eq!(share_dto.item_id, "test_file_id");
assert_eq!(share_dto.item_type, "file"); assert_eq!(share_dto.item_type, "file");
assert!(share_dto.has_password); assert!(share_dto.has_password);
assert!(share_dto.url.starts_with("http://127.0.0.1:8086/s/")); assert!(share_dto.url.starts_with("http://127.0.0.1:8086/api/s/"));
} }
} }