[Videos] Fix uploads (#5042)

* fix pds url

* fix service auth exp

* whoopsie wrong branch
This commit is contained in:
Samuel Newman 2024-08-30 18:44:00 +01:00 committed by GitHub
parent c60e8d0772
commit e7954e590b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 14 deletions

View file

@ -340,7 +340,7 @@ export function shortLinkToHref(url: string): string {
}
}
export function getHostnameFromUrl(url: string): string | null {
export function getHostnameFromUrl(url: string | URL): string | null {
let urlp
try {
urlp = new URL(url)
@ -350,7 +350,7 @@ export function getHostnameFromUrl(url: string): string | null {
return urlp.hostname
}
export function getServiceAuthAudFromUrl(url: string): string | null {
export function getServiceAuthAudFromUrl(url: string | URL): string | null {
const hostname = getHostnameFromUrl(url)
if (!hostname) {
return null