From 95729814860200fdf4f0e792a4ba9f02a4800402 Mon Sep 17 00:00:00 2001
From: Angelina Filippova <linakirsanova@gmail.com>
Date: Wed, 18 Mar 2020 21:13:39 +0000
Subject: [PATCH] Merge branch 'fix/emails-with-symbols' into 'develop'

Fix parsing emails with symbols

See merge request pleroma/admin-fe!105

(cherry picked from commit d021c77a3e08909b016d2e8d1fa08726d0ea1ec6)

88b5abc6 Fix parsing emails with symbols
---
 src/api/invites.js | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/api/invites.js b/src/api/invites.js
index 1d8371db..a303ac17 100644
--- a/src/api/invites.js
+++ b/src/api/invites.js
@@ -13,14 +13,13 @@ export async function generateInviteToken(max_use, expires_at, authHost, token)
 }
 
 export async function inviteViaEmail(email, name, authHost, token) {
-  const url = name.length > 0
-    ? `/api/pleroma/admin/users/email_invite?email=${email}&name=${name}`
-    : `/api/pleroma/admin/users/email_invite?email=${email}`
+  const data = name.length > 0 ? { email, name } : { email }
   return await request({
     baseURL: baseName(authHost),
-    url,
+    url: '/api/pleroma/admin/users/email_invite',
     method: 'post',
-    headers: authHeaders(token)
+    headers: authHeaders(token),
+    data
   })
 }
 
-- 
GitLab