Verified Commit 95b107b6 authored by Haelwenn's avatar Haelwenn
Browse files

admin_api_controller.ex: Add documentation, fix get_invite_token

parent 578a9117
......@@ -55,13 +55,15 @@ def relay_unfollow(conn, %{relay_url: target}) do
|> send(200)
@shortdoc "Get a account registeration invite token (base64 string)"
def get_invite_token(conn, _params) do
{:ok, token} <- Pleroma.UserInviteToken.create_token()
|> puts(token)
|> json(token.token)
@shortdoc "Get a password reset token (base64 string) for given nickname"
def get_password_reset(conn, %{"nickname" => nickname}) do
(%User{local: true} = user) = User.get_by_nickname(nickname)
{:ok, token} = Pleroma.PasswordResetToken.create_token(user)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment