Commit 0acb46cd authored by Mayel's avatar Mayel

sign up form

parent 8df95130
Pipeline #28845720 (#13) failed with stages
in 2 minutes and 56 seconds
......@@ -1135,8 +1135,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|> render(MastodonView, "register.html", %{error: false})
end
def register_post(conn, params) do
with {:ok, user} <- TwitterAPI.register_user(params),
def register_post(conn, %{"register" => register}) do
with {:ok, user} <- TwitterAPI.register_user(register),
{:ok, app} <- get_or_make_app(),
{:ok, auth} <- Authorization.create_authorization(app, user),
{:ok, token} <- Token.exchange_token(app, auth) do
......
<h2>Sign Up</h2>
<%= if @error do %>
<h2><%= @error %></h2>
<% end %>
<%= form_for @conn, mastodon_api_path(@conn, :register), [as: "register"], fn f -> %>
<%= text_input f, :fullname, placeholder: "Your name" %>
<br>
<%= text_input f, :email, placeholder: "Your email" %>
<br>
<%= text_input f, :nickname, placeholder: "Choose a username" %>
<br>
<%= password_input f, :password, placeholder: "Choose a password" %>
<br>
<%= password_input f, :confirm, placeholder: "Confirm your password" %>
<br>
<%= submit "Sign Up" %>
<% end %>
Markdown is supported
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