forked from AkkomaGang/admin-fe
Fix parsing emails with symbols
This commit is contained in:
parent
ce3d3387cf
commit
88b5abc6a3
1 changed files with 4 additions and 5 deletions
|
@ -13,14 +13,13 @@ export async function generateInviteToken(max_use, expires_at, authHost, token)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function inviteViaEmail(email, name, authHost, token) {
|
export async function inviteViaEmail(email, name, authHost, token) {
|
||||||
const url = name.length > 0
|
const data = name.length > 0 ? { email, name } : { email }
|
||||||
? `/api/pleroma/admin/users/email_invite?email=${email}&name=${name}`
|
|
||||||
: `/api/pleroma/admin/users/email_invite?email=${email}`
|
|
||||||
return await request({
|
return await request({
|
||||||
baseURL: baseName(authHost),
|
baseURL: baseName(authHost),
|
||||||
url,
|
url: '/api/pleroma/admin/users/email_invite',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
headers: authHeaders(token)
|
headers: authHeaders(token),
|
||||||
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue