mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 17:17:26 +01:00
Fix: share links for URLs containing 'api' incorrect in dropdown (#4701)
This commit is contained in:
parent
5297626816
commit
0913c7aa9e
2 changed files with 24 additions and 1 deletions
|
|
@ -80,7 +80,10 @@ export class ShareLinksDropdownComponent implements OnInit {
|
|||
}
|
||||
|
||||
getShareUrl(link: PaperlessShareLink): string {
|
||||
return `${environment.apiBaseUrl.replace('api', 'share')}${link.slug}`
|
||||
const apiURL = new URL(environment.apiBaseUrl)
|
||||
return `${apiURL.origin}${apiURL.pathname.replace(/\/api\/$/, '/share/')}${
|
||||
link.slug
|
||||
}`
|
||||
}
|
||||
|
||||
getDaysRemaining(link: PaperlessShareLink): string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue