Commit 8f439921 authored by dtluna's avatar dtluna
Browse files

Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into develop

parents b502d798 567ec494
defmodule Mix.Tasks.RegisterUser do
use Mix.Task
import Mix.Ecto
alias Pleroma.{Repo, User}
@shortdoc "Register user"
def run([name, nickname, email, bio, password]) do
ensure_started(Repo, [])
user = %User{
name: name,
nickname: nickname,
email: email,
password_hash: Comeonin.Pbkdf2.hashpwsalt(password),
bio: bio
}
user = %{ user | ap_id: User.ap_id(user) }
Repo.insert!(user)
end
end
......@@ -12,7 +12,7 @@ def verify_credentials(%{assigns: %{user: user}} = conn, _params) do
def status_update(%{assigns: %{user: user}} = conn, status_data) do
media_ids = extract_media_ids(status_data)
{:ok, activity} = TwitterAPI.create_status(user, %{ "status" => status_data["status"], "media_ids" => media_ids })
{:ok, activity} = TwitterAPI.create_status(user, Map.put(status_data, "media_ids", media_ids ))
conn
|> json_reply(200, ActivityRepresenter.to_json(activity, %{user: user}))
end
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>Pleroma</title><link rel=stylesheet href=/static/font/css/fontello.css><link rel=stylesheet href=/static/font/css/animation.css><link href=/static/css/app.c9152df945545cbfad798e27da935399.css rel=stylesheet></head><body style="display: none"><div id=app></div><script type=text/javascript src=/static/js/manifest.53ddf71d231dbc5f82dc.js></script><script type=text/javascript src=/static/js/vendor.a3ec6a31a96c8e7709d8.js></script><script type=text/javascript src=/static/js/app.8e94b6d65028f6ffaeee.js></script></body></html>
\ No newline at end of file
{
"name": "Pleroma FE",
"theme": "base16-ashes.css",
"background": "/static/bg.jpg",
"logo": "/static/logo.png"
}
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
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