Use bindings dbuser and dbname in sample_psql.eex

This commit is contained in:
link0ff 2018-12-16 18:25:31 +02:00
parent 7c235b8874
commit 22d483d4f7
2 changed files with 11 additions and 13 deletions

View File

@ -1,6 +1,6 @@
CREATE USER pleroma WITH ENCRYPTED PASSWORD '<%= dbpass %>';
CREATE DATABASE pleroma_dev OWNER pleroma;
\c pleroma_dev;
CREATE USER <%= dbuser %> WITH ENCRYPTED PASSWORD '<%= dbpass %>';
CREATE DATABASE <%= dbname %> OWNER <%= dbuser %>;
\c <%= dbname %>;
--Extensions made by ecto.migrate that need superuser access
CREATE EXTENSION IF NOT EXISTS citext;
CREATE EXTENSION IF NOT EXISTS pg_trgm;

View File

@ -94,8 +94,7 @@ def run(["new", nickname, email | rest]) do
unless not proceed? do
Common.start_pleroma()
params =
%{
params = %{
nickname: nickname,
email: email,
password: password,
@ -103,7 +102,6 @@ def run(["new", nickname, email | rest]) do
name: name,
bio: bio
}
|> IO.inspect()
user = User.register_changeset(%User{}, params)
Repo.insert!(user)