aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/root-helpers/utils.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-08-03 18:06:49 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-08-06 15:08:58 +0200
commit4504f09f6e85f09b0489debb547a17209d7176ea (patch)
tree1e2fdcdd3a0982f6e873205f69bdf90de7f4a883 /client/src/root-helpers/utils.ts
parent71ab65d02f359000f9ca6a00f163d66d56a33955 (diff)
downloadPeerTube-4504f09f6e85f09b0489debb547a17209d7176ea.tar.gz
PeerTube-4504f09f6e85f09b0489debb547a17209d7176ea.tar.zst
PeerTube-4504f09f6e85f09b0489debb547a17209d7176ea.zip
deal with refresh token in embed
Diffstat (limited to 'client/src/root-helpers/utils.ts')
-rw-r--r--client/src/root-helpers/utils.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/src/root-helpers/utils.ts b/client/src/root-helpers/utils.ts
new file mode 100644
index 000000000..acfb565a3
--- /dev/null
+++ b/client/src/root-helpers/utils.ts
@@ -0,0 +1,12 @@
1function objectToUrlEncoded (obj: any) {
2 const str: string[] = []
3 for (const key of Object.keys(obj)) {
4 str.push(encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]))
5 }
6
7 return str.join('&')
8}
9
10export {
11 objectToUrlEncoded
12}