@@ -10,7 +10,7 @@ defmodule Eventos.Repo.Migrations.CreateAccounts do
|
||||
add :private_key, :text
|
||||
add :public_key, :text, null: false
|
||||
add :suspended, :boolean, default: false, null: false
|
||||
add :uri, :string, null: false
|
||||
add :uri, :string
|
||||
add :url, :string
|
||||
|
||||
timestamps()
|
||||
|
||||
@@ -5,8 +5,8 @@ defmodule Eventos.Repo.Migrations.CreateUsers do
|
||||
create table(:users) do
|
||||
add :email, :string, null: false
|
||||
add :role, :integer, default: 0, null: false
|
||||
add :password_hash, :string
|
||||
add :account_id, references(:accounts, on_delete: :delete_all, null: false)
|
||||
add :password_hash, :string, null: false
|
||||
add :account_id, references(:accounts, on_delete: :delete_all), null: false
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
@@ -9,9 +9,29 @@
|
||||
#
|
||||
# We recommend using the bang functions (`insert!`, `update!`
|
||||
# and so on) as they will fail if something goes wrong.
|
||||
import Logger
|
||||
|
||||
Eventos.Repo.delete_all Eventos.Accounts.User
|
||||
|
||||
Eventos.Accounts.User.registration_changeset(%Eventos.Accounts.User{}, %{email: "testuser@example.com", password: "secret", password_confirmation: "secret"})
|
||||
|> Eventos.Repo.insert!
|
||||
|
||||
{:ok, {privkey, pubkey}} = RsaEx.generate_keypair("4096")
|
||||
account = Ecto.Changeset.change(%Eventos.Accounts.Account{}, %{
|
||||
username: "tcit",
|
||||
description: "myaccount",
|
||||
display_name: "Thomas Citharel",
|
||||
domain: nil,
|
||||
private_key: privkey,
|
||||
public_key: pubkey,
|
||||
uri: "",
|
||||
url: ""
|
||||
})
|
||||
|
||||
user = Eventos.Accounts.User.registration_changeset(%Eventos.Accounts.User{}, %{
|
||||
email: "tcit@tcit.fr",
|
||||
password: "tcittcit",
|
||||
password_confirmation: "tcittcit"
|
||||
})
|
||||
|
||||
account_with_user = Ecto.Changeset.put_assoc(account, :user, user)
|
||||
|
||||
Eventos.Repo.insert!(account_with_user)
|
||||
|
||||
5
priv/static/css/app.c6f4f0637b07f4b32d59e43e26ada6c7.css
Normal file
5
priv/static/css/app.c6f4f0637b07f4b32d59e43e26ada6c7.css
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
BIN
priv/static/img/oh_no.d61c172.jpg
Normal file
BIN
priv/static/img/oh_no.d61c172.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
2
priv/static/js/app.dc4c839388191b886181.js
Normal file
2
priv/static/js/app.dc4c839388191b886181.js
Normal file
File diff suppressed because one or more lines are too long
1
priv/static/js/app.dc4c839388191b886181.js.map
Normal file
1
priv/static/js/app.dc4c839388191b886181.js.map
Normal file
File diff suppressed because one or more lines are too long
@@ -1,3 +0,0 @@
|
||||
// for phoenix_html support, including form and button helpers
|
||||
// copy the following scripts into your javascript bundle:
|
||||
// * https://raw.githubusercontent.com/phoenixframework/phoenix_html/v2.10.0/priv/static/phoenix_html.js
|
||||
2
priv/static/js/manifest.79c2975577a8222315fd.js
Normal file
2
priv/static/js/manifest.79c2975577a8222315fd.js
Normal file
@@ -0,0 +1,2 @@
|
||||
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,u){for(var a,i,f,s=0,l=[];s<t.length;s++)i=t[s],o[i]&&l.push(o[i][0]),o[i]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(e[a]=c[a]);for(r&&r(t,c,u);l.length;)l.shift()();if(u)for(s=0;s<u.length;s++)f=n(n.s=u[s]);return f};var t={},o={2:0};n.e=function(e){function r(){a.onerror=a.onload=null,clearTimeout(i);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}var t=o[e];if(0===t)return new Promise(function(e){e()});if(t)return t[2];var c=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=c;var u=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,n.nc&&a.setAttribute("nonce",n.nc),a.src=n.p+"js/"+e+"."+{0:"94561603df84d1708ae1",1:"dc4c839388191b886181"}[e]+".js";var i=setTimeout(r,12e4);return a.onerror=a.onload=r,u.appendChild(a),c},n.m=e,n.c=t,n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="/",n.oe=function(e){throw console.error(e),e}}([]);
|
||||
//# sourceMappingURL=manifest.79c2975577a8222315fd.js.map
|
||||
1
priv/static/js/manifest.79c2975577a8222315fd.js.map
Normal file
1
priv/static/js/manifest.79c2975577a8222315fd.js.map
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
18
priv/static/js/vendor.94561603df84d1708ae1.js
Normal file
18
priv/static/js/vendor.94561603df84d1708ae1.js
Normal file
File diff suppressed because one or more lines are too long
1
priv/static/js/vendor.94561603df84d1708ae1.js.map
Normal file
1
priv/static/js/vendor.94561603df84d1708ae1.js.map
Normal file
File diff suppressed because one or more lines are too long
BIN
priv/static/oh_no.jpg
Normal file
BIN
priv/static/oh_no.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
@@ -1,5 +0,0 @@
|
||||
# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|
||||
#
|
||||
# To ban all spiders from the entire site uncomment the next two lines:
|
||||
# User-agent: *
|
||||
# Disallow: /
|
||||
Reference in New Issue
Block a user