Skip to content
Snippets Groups Projects
Commit 4d7889d7 authored by Maxim Filippov's avatar Maxim Filippov :new_moon_with_face:
Browse files

Merge branch 'feature/confirm-user-resend-confirmation' into 'develop'

Confirm user account, resend confirmation email

Closes #49

See merge request !68
parents 0c6c51bb 99454263
Branches
No related tags found
1 merge request!68Confirm user account, resend confirmation email
Pipeline #20764 passed
Showing
with 21 additions and 0 deletions
......@@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Relay management
- Ability to fetch all statuses from a given instance
- Grouped reports: now you can view reports, which are grouped by status (pagination is not implemented yet, though)
- Ability to confirm users' emails and resend confirmation emails
### Fixed
......
......@@ -136,4 +136,24 @@ export async function fetchUserStatuses(id, authHost, godmode, token) {
})
}
export async function confirmUserEmail(nicknames, authHost, token) {
return await request({
baseURL: baseName(authHost),
url: '/api/pleroma/admin/users/confirm_email',
method: 'patch',
headers: authHeaders(token),
data: { nicknames }
})
}
export async function resendConfirmationEmail(nicknames, authHost, token) {
return await request({
baseURL: baseName(authHost),
url: '/api/pleroma/admin/users/resend_confirmation_email',
method: 'patch',
headers: authHeaders(token),
data: { nicknames }
})
}
const authHeaders = (token) => token ? { 'Authorization': `Bearer ${getToken()}` } : {}
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment