]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/helpers/utils/url.ts
Added filter to sort videos by name (alphabetical order)
[github/Chocobozzz/PeerTube.git] / client / src / app / helpers / utils / url.ts
index b3cded8f4e2b15534663a4db59589a4cd144e339..08c27e3c1e907c9ebb6e746f13ecb6bc2fbc8f88 100644 (file)
@@ -13,6 +13,10 @@ function getAbsoluteAPIUrl () {
   return absoluteAPIUrl
 }
 
+function getAPIHost () {
+  return new URL(getAbsoluteAPIUrl()).host
+}
+
 function getAbsoluteEmbedUrl () {
   let absoluteEmbedUrl = environment.originServerUrl
   if (!absoluteEmbedUrl) {
@@ -52,5 +56,6 @@ function objectToFormData (obj: any, form?: FormData, namespace?: string) {
 export {
   objectToFormData,
   getAbsoluteAPIUrl,
+  getAPIHost,
   getAbsoluteEmbedUrl
 }