From 6a1dbbca8a6efab45286735e28cf1b493001cbd8 Mon Sep 17 00:00:00 2001 From: optclblast Date: Mon, 2 Sep 2024 00:29:30 +0300 Subject: [PATCH 1/4] heex login screen added --- assets/css/app.css | 90 ++++++++++++++- assets/js/app.js | 30 +++++ lib/draincloud_core/application.ex | 1 + lib/draincloud_core/auth/auth.ex | 5 + lib/draincloud_core/rtc.ex | 104 +++++++++++++++++- .../components/layouts/root.html.heex | 3 +- .../controllers/page_controller.ex | 9 +- .../controllers/page_html/home.html.heex | 18 ++- .../controllers/page_html/login.html.heex | 17 +++ mix.exs | 2 +- schemas/users.sql | 5 + 11 files changed, 276 insertions(+), 8 deletions(-) create mode 100644 lib/draincloud_core/auth/auth.ex create mode 100644 lib/draincloud_core_web/controllers/page_html/login.html.heex create mode 100644 schemas/users.sql diff --git a/assets/css/app.css b/assets/css/app.css index 378c8f9..f29cd30 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -2,4 +2,92 @@ @import "tailwindcss/components"; @import "tailwindcss/utilities"; -/* This file is for your main application CSS */ + + +body { + font-family: Arial, sans-serif; + background-color: #f7f7f7; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 100vh; + margin: 0; +} +header { + width: 100%; + background-color: #0d1547; + padding: 15px 0; + text-align: center; + color: rgb(255, 241, 233); + font-size: 18px; + font-weight: bold; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + position: fixed; + top: 0; + left: 0; + z-index: 1000; +} +.login-container { + background-color: #fff; + padding: 20px; + border-radius: 8px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + width: 300px; +} +h2 { + margin-bottom: 20px; + color: #333; + text-align: center; +} +.input-group { + margin-bottom: 15px; +} +.input-group label { + display: block; + margin-bottom: 5px; + color: #555; +} +.input-group input { + width: 100%; + padding: 10px; + border: 1px solid #ccc; + border-radius: 4px; +} +.login-button { + width: 100%; + padding: 10px; + background-color: #0d1547; + color: #fff; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 16px; +} +.login-button:hover { + background-color: #0d1547; +} + +.gallery-container { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); + grid-gap: 10px; + padding: 10px; +} +.gallery-item { + background-color: #fff; + padding: 10px; + border-radius: 8px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + text-align: center; +} +.gallery-item img { + max-width: 100%; + height: auto; + border-radius: 4px; +} +.gallery-item p { + margin-top: 10px; + font-size: 14px; + color: #555; +} \ No newline at end of file diff --git a/assets/js/app.js b/assets/js/app.js index d5e278a..8bc9b8a 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -42,3 +42,33 @@ liveSocket.connect() // >> liveSocket.disableLatencySim() window.liveSocket = liveSocket +function initialize_gallery() { + document.addEventListener('DOMContentLoaded', function() { + const imagePaths = [ + 'image1.jpg', + 'image2.jpg', + 'image3.jpg', + 'image4.jpg', + 'image5.jpg' + // Add more image filenames here + ]; + + const gallery = document.getElementById('gallery'); + + imagePaths.forEach(function(image) { + const item = document.createElement('div'); + item.className = 'gallery-item'; + + const img = document.createElement('img'); + img.src = '/images/' + image; + img.alt = image; + + const caption = document.createElement('p'); + caption.textContent = image; + + item.appendChild(img); + item.appendChild(caption); + gallery.appendChild(item); + }); + }); +} \ No newline at end of file diff --git a/lib/draincloud_core/application.ex b/lib/draincloud_core/application.ex index bb1e624..76b9108 100644 --- a/lib/draincloud_core/application.ex +++ b/lib/draincloud_core/application.ex @@ -10,6 +10,7 @@ defmodule DrainCloudCore.Application do children = [ DrainCloudCoreWeb.Telemetry, DrainCloudCore.Repo, + # DrainCloudCore.Rtc, {DNSCluster, query: Application.get_env(:draincloud_core, :dns_cluster_query) || :ignore}, {Phoenix.PubSub, name: DrainCloudCore.PubSub}, # Start a worker by calling: DrainCloudCore.Worker.start_link(arg) diff --git a/lib/draincloud_core/auth/auth.ex b/lib/draincloud_core/auth/auth.ex new file mode 100644 index 0000000..43acb86 --- /dev/null +++ b/lib/draincloud_core/auth/auth.ex @@ -0,0 +1,5 @@ +defmodule DraincloudCore.Auth do + def is_logon(token) :: boolean() do + + end +end diff --git a/lib/draincloud_core/rtc.ex b/lib/draincloud_core/rtc.ex index 41c40b1..22e62f5 100644 --- a/lib/draincloud_core/rtc.ex +++ b/lib/draincloud_core/rtc.ex @@ -1,3 +1,103 @@ -defmodule DraincloudCore.Rtc do - # Real Time Config module +defmodule DrainCloudCore.Rtc.Application do + use Application + + def child_spec(opts) do + %{ + id: __MODULE__, + start: {__MODULE__, :start_link, [opts]}, + shutdown: 5_000, + restart: :permanent, + type: :supervisor + } + end + def start_link(_) do + children = [ + DrainCloudCore.Rtc + ] + + opts = [strategy: :one_for_one, name: DrainCloudCore.Rtc.Supervisor] + Supervisor.start_link(children, opts) + end +end + +defmodule DrainCloudCore.Rtc do + alias :mnesia, as: Mnesia + alias :logger, as: Log + + use GenServer + + # Real-time config table schemas + @config_web [attributes: [ + :host, + :enable_https, + :port, + ]] + + @config_pg [attributes: [ + :host, + :port, + :ssl, + :user, + :password, + :db, + ]] + + + @config_s3 [attributes: [ + :host, + :port, + # user / secret / secrets etc... + ]] + + # def child_spec(opts) do + # %{ + # id: __MODULE__, + # start: {__MODULE__, :start_link, [opts]}, + # shutdown: 5_000, + # restart: :permanent, + # type: :worker + # } + # end + + def start_link(default) when is_list(default) do + GenServer.start_link(__MODULE__, default) + end + + @impl true + def init(stack) do + {:ok, stack} + end + + @impl true + def handle_call(:pop, _from, [head | tail]) do + {:reply, head, tail} + end + + @impl true + def handle_cast({:push, element}, state) do + {:noreply, [element | state]} + end + + def fetch_config() do + # Mnesia.read() + end + def init() do + Log.info("[#{__MODULE__}] start initializin RTC subsystems") + + if Mnesia.create_schema([node()]) != :ok do + Log.warning("[#{__MODULE__}] schema #{node()} not created. skipping") + end + + if Mnesia.create_table(DrainCloudRtcWeb, @config_web) != {:atomic, :ok} do + Log.warning("[#{__MODULE__}] table config_web not created. skipping") + end + + if Mnesia.create_table(DrainCloudRtcPG, @config_pg) != {:atomic, :ok} do + Log.warning("[#{__MODULE__}] schema config_pg not created. skipping") + end + + if Mnesia.create_table(DrainCloudRtcS3, @config_s3) != {:atomic, :ok} do + Log.warning("[#{__MODULE__}] schema config_s3 not created. skipping") + end + end end diff --git a/lib/draincloud_core_web/components/layouts/root.html.heex b/lib/draincloud_core_web/components/layouts/root.html.heex index 83899b2..90e81b6 100644 --- a/lib/draincloud_core_web/components/layouts/root.html.heex +++ b/lib/draincloud_core_web/components/layouts/root.html.heex @@ -8,7 +8,8 @@ <%= assigns[:page_title] || "DrainCloudCore" %> - + diff --git a/lib/draincloud_core_web/controllers/page_controller.ex b/lib/draincloud_core_web/controllers/page_controller.ex index 3fc85aa..8921305 100644 --- a/lib/draincloud_core_web/controllers/page_controller.ex +++ b/lib/draincloud_core_web/controllers/page_controller.ex @@ -1,9 +1,14 @@ defmodule DrainCloudCoreWeb.PageController do use DrainCloudCoreWeb, :controller - - def home(conn, _params) do + def home(conn, _params) when is_logon(conn) do # The home page is often custom made, # so skip the default app layout. + + if Map.has_key?(conn.req_headers, 'x-access-token') do + {_, token} = Map.fetch(conn.req_headers, 'x-access-token') + + end + render(conn, :home, layout: false) end end diff --git a/lib/draincloud_core_web/controllers/page_html/home.html.heex b/lib/draincloud_core_web/controllers/page_html/home.html.heex index 3b2634d..658ec98 100644 --- a/lib/draincloud_core_web/controllers/page_html/home.html.heex +++ b/lib/draincloud_core_web/controllers/page_html/home.html.heex @@ -1 +1,17 @@ -

Hello

\ No newline at end of file +
+ DrainCloud +
+
+

Login

+
+
+ + +
+
+ + +
+ +
+
\ No newline at end of file diff --git a/lib/draincloud_core_web/controllers/page_html/login.html.heex b/lib/draincloud_core_web/controllers/page_html/login.html.heex new file mode 100644 index 0000000..658ec98 --- /dev/null +++ b/lib/draincloud_core_web/controllers/page_html/login.html.heex @@ -0,0 +1,17 @@ +
+ DrainCloud +
+
+

Login

+
+
+ + +
+
+ + +
+ +
+
\ No newline at end of file diff --git a/mix.exs b/mix.exs index 7672f7f..54fa208 100644 --- a/mix.exs +++ b/mix.exs @@ -19,7 +19,7 @@ defmodule DrainCloudCore.MixProject do def application do [ mod: {DrainCloudCore.Application, []}, - extra_applications: [:logger, :runtime_tools] + extra_applications: [:logger, :runtime_tools, :mnesia] ] end diff --git a/schemas/users.sql b/schemas/users.sql new file mode 100644 index 0000000..c2ae31e --- /dev/null +++ b/schemas/users.sql @@ -0,0 +1,5 @@ +create table users ( + id bigserial, + login varchar(50), + password varchar(256) +); \ No newline at end of file -- 2.45.2 From a599dd8930dc6c63d80e7440e52a3dfc2063f0c8 Mon Sep 17 00:00:00 2001 From: optclblast Date: Mon, 2 Sep 2024 01:39:43 +0300 Subject: [PATCH 2/4] trying to implement all with elixir-way --- lib/draincloud_core/auth/auth.ex | 5 ++-- .../auth_controller/auth_controller.ex | 7 +++++ .../controllers/{ => errors}/error_html.ex | 0 .../controllers/{ => errors}/error_json.ex | 0 .../controllers/page_controller.ex | 14 ---------- .../page_controller/page_controller.ex | 26 +++++++++++++++++++ .../{ => page_controller}/page_html.ex | 0 .../page_html/home.html.heex | 0 .../page_html/login.html.heex | 0 .../controllers/request/request_utils.ex | 13 ++++++++++ priv/repo/migrations/20240901221317_users.exs | 7 +++++ 11 files changed, 56 insertions(+), 16 deletions(-) create mode 100644 lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex rename lib/draincloud_core_web/controllers/{ => errors}/error_html.ex (100%) rename lib/draincloud_core_web/controllers/{ => errors}/error_json.ex (100%) delete mode 100644 lib/draincloud_core_web/controllers/page_controller.ex create mode 100644 lib/draincloud_core_web/controllers/page_controller/page_controller.ex rename lib/draincloud_core_web/controllers/{ => page_controller}/page_html.ex (100%) rename lib/draincloud_core_web/controllers/{ => page_controller}/page_html/home.html.heex (100%) rename lib/draincloud_core_web/controllers/{ => page_controller}/page_html/login.html.heex (100%) create mode 100644 lib/draincloud_core_web/controllers/request/request_utils.ex create mode 100644 priv/repo/migrations/20240901221317_users.exs diff --git a/lib/draincloud_core/auth/auth.ex b/lib/draincloud_core/auth/auth.ex index 43acb86..abf9db2 100644 --- a/lib/draincloud_core/auth/auth.ex +++ b/lib/draincloud_core/auth/auth.ex @@ -1,5 +1,6 @@ defmodule DraincloudCore.Auth do - def is_logon(token) :: boolean() do - + def is_logon(_token) do + # TODO here + true end end diff --git a/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex b/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex new file mode 100644 index 0000000..d2ec239 --- /dev/null +++ b/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex @@ -0,0 +1,7 @@ +defmodule DrainCloudCoreWeb.AuthController do + use DrainCloudCoreWeb, :controller + + def logon(conn, _params) do + + end +end diff --git a/lib/draincloud_core_web/controllers/error_html.ex b/lib/draincloud_core_web/controllers/errors/error_html.ex similarity index 100% rename from lib/draincloud_core_web/controllers/error_html.ex rename to lib/draincloud_core_web/controllers/errors/error_html.ex diff --git a/lib/draincloud_core_web/controllers/error_json.ex b/lib/draincloud_core_web/controllers/errors/error_json.ex similarity index 100% rename from lib/draincloud_core_web/controllers/error_json.ex rename to lib/draincloud_core_web/controllers/errors/error_json.ex diff --git a/lib/draincloud_core_web/controllers/page_controller.ex b/lib/draincloud_core_web/controllers/page_controller.ex deleted file mode 100644 index 8921305..0000000 --- a/lib/draincloud_core_web/controllers/page_controller.ex +++ /dev/null @@ -1,14 +0,0 @@ -defmodule DrainCloudCoreWeb.PageController do - use DrainCloudCoreWeb, :controller - def home(conn, _params) when is_logon(conn) do - # The home page is often custom made, - # so skip the default app layout. - - if Map.has_key?(conn.req_headers, 'x-access-token') do - {_, token} = Map.fetch(conn.req_headers, 'x-access-token') - - end - - render(conn, :home, layout: false) - end -end diff --git a/lib/draincloud_core_web/controllers/page_controller/page_controller.ex b/lib/draincloud_core_web/controllers/page_controller/page_controller.ex new file mode 100644 index 0000000..95589a3 --- /dev/null +++ b/lib/draincloud_core_web/controllers/page_controller/page_controller.ex @@ -0,0 +1,26 @@ +defmodule DrainCloudCoreWeb.PageController do + use DrainCloudCoreWeb, :controller + + def home(conn, _params) do + # The home page is often custom made, + # so skip the default app layout. + + # TODO + # 1. check is user is logged in + # 2. if is - fetch the main page contents (files, folders etc) + # 2.1 fetch session by token. If NotFOund -> (3) + # 2.2 fetch content by sessions user_id + # 2.3 render page + # If not: + # 3. Redirect to the login page + + # if Map.has_key?(conn.req_headers, 'x-access-token') do + # {_, token} = Map.fetch(conn.req_headers, 'x-access-token') + + # end + + :logger.debug("[#{__MODULE__}] request: ", conn) + + render(conn, :home, layout: false) + end +end diff --git a/lib/draincloud_core_web/controllers/page_html.ex b/lib/draincloud_core_web/controllers/page_controller/page_html.ex similarity index 100% rename from lib/draincloud_core_web/controllers/page_html.ex rename to lib/draincloud_core_web/controllers/page_controller/page_html.ex diff --git a/lib/draincloud_core_web/controllers/page_html/home.html.heex b/lib/draincloud_core_web/controllers/page_controller/page_html/home.html.heex similarity index 100% rename from lib/draincloud_core_web/controllers/page_html/home.html.heex rename to lib/draincloud_core_web/controllers/page_controller/page_html/home.html.heex diff --git a/lib/draincloud_core_web/controllers/page_html/login.html.heex b/lib/draincloud_core_web/controllers/page_controller/page_html/login.html.heex similarity index 100% rename from lib/draincloud_core_web/controllers/page_html/login.html.heex rename to lib/draincloud_core_web/controllers/page_controller/page_html/login.html.heex diff --git a/lib/draincloud_core_web/controllers/request/request_utils.ex b/lib/draincloud_core_web/controllers/request/request_utils.ex new file mode 100644 index 0000000..2080458 --- /dev/null +++ b/lib/draincloud_core_web/controllers/request/request_utils.ex @@ -0,0 +1,13 @@ +defmodule DraincloudCoreWeb.Request do + # defstruct : + def has_token?(conn) do + # TODO try with pattern-matching please + # case conn do + # {} -> + # end + + if Map.has_key?(conn, "req_headers") do + Map.has_key?(conn.req_headers, 'x-access-token') + end + end +end diff --git a/priv/repo/migrations/20240901221317_users.exs b/priv/repo/migrations/20240901221317_users.exs new file mode 100644 index 0000000..8395c5a --- /dev/null +++ b/priv/repo/migrations/20240901221317_users.exs @@ -0,0 +1,7 @@ +defmodule DrainCloudCore.Repo.Migrations.Users do + use Ecto.Migration + + def change do + # TODO users table migration + end +end -- 2.45.2 From 3446a84af30f4e7e93a4d05faf8df5f4973b91c2 Mon Sep 17 00:00:00 2001 From: optclblast Date: Tue, 3 Sep 2024 00:48:58 +0300 Subject: [PATCH 3/4] tmp --- docker-compose.yaml | 23 ++++++++++++++++++- .../auth_controller/auth_controller.ex | 3 ++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index d295bb4..5f06def 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -9,5 +9,26 @@ services: ports: - 5432:5432 + minio: + image: quay.io/minio/minio:RELEASE.2024-08-29T01-40-52Z + command: server --console-address ":9001" http://minio/data{1...2} + hostname: minio + volumes: + - data-1:/data1 + - data-2:/data2 + expose: + - "9000" + - "9001" + environment: + MINIO_ROOT_USER: minioadmin + MINIO_ROOT_PASSWORD: minioadmin + healthcheck: + test: ["CMD", "mc", "ready", "local"] + interval: 5s + timeout: 5s + retries: 5 + volumes: - draincore-data: {} \ No newline at end of file + draincore-data: + data-1: + data-2: \ No newline at end of file diff --git a/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex b/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex index d2ec239..d040128 100644 --- a/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex +++ b/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex @@ -1,7 +1,8 @@ defmodule DrainCloudCoreWeb.AuthController do use DrainCloudCoreWeb, :controller + alias DrainCloudCoreWeb.Request, as: Request def logon(conn, _params) do - + if end end -- 2.45.2 From 52c5a88fb53fe2ee8059fcabde419ceba09fbb96 Mon Sep 17 00:00:00 2001 From: optclblast Date: Thu, 5 Sep 2024 00:29:50 +0300 Subject: [PATCH 4/4] readme updated and small phx tinkering --- README.md | 9 +++++-- .../auth_controller/auth_controller.ex | 6 ++++- .../main_controller/main_controller.ex | 11 ++++++++ .../page_controller/page_controller.ex | 26 ------------------- .../controllers/page_controller/page_html.ex | 10 ------- .../page_controller/page_html/home.html.heex | 17 ------------ .../page_controller/page_html/login.html.heex | 17 ------------ lib/draincloud_core_web/router.ex | 4 +-- 8 files changed, 25 insertions(+), 75 deletions(-) create mode 100644 lib/draincloud_core_web/controllers/main_controller/main_controller.ex delete mode 100644 lib/draincloud_core_web/controllers/page_controller/page_controller.ex delete mode 100644 lib/draincloud_core_web/controllers/page_controller/page_html.ex delete mode 100644 lib/draincloud_core_web/controllers/page_controller/page_html/home.html.heex delete mode 100644 lib/draincloud_core_web/controllers/page_controller/page_html/login.html.heex diff --git a/README.md b/README.md index 50cf6f8..0b50ae0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,11 @@ # DrainCloudCore +**DrainCloud** is an opensource cloud file management service, aimed for an ease of usage in a self-hosted usage scenarios. +The main goal is to create a *easy-to-host* and very performant application with small footprint. -To start your Phoenix server: +*TODO put docs here* + +## Development +To start your DrainCloudCore server: * Run `mix setup` to install and setup dependencies * Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server` @@ -9,7 +14,7 @@ Now you can visit [`localhost:4000`](http://localhost:4000) from your browser. Ready to run in production? Please [check our deployment guides](https://hexdocs.pm/phoenix/deployment.html). -## Learn more +### Some phoenix related links * Official website: https://www.phoenixframework.org/ * Guides: https://hexdocs.pm/phoenix/overview.html diff --git a/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex b/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex index d040128..e8e681b 100644 --- a/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex +++ b/lib/draincloud_core_web/controllers/auth_controller/auth_controller.ex @@ -3,6 +3,10 @@ defmodule DrainCloudCoreWeb.AuthController do alias DrainCloudCoreWeb.Request, as: Request def logon(conn, _params) do - if + if Request.hs_token?(conn) do + # TODO validate token here + end + + end end diff --git a/lib/draincloud_core_web/controllers/main_controller/main_controller.ex b/lib/draincloud_core_web/controllers/main_controller/main_controller.ex new file mode 100644 index 0000000..7a93c37 --- /dev/null +++ b/lib/draincloud_core_web/controllers/main_controller/main_controller.ex @@ -0,0 +1,11 @@ +defmodule DrainCloudCoreWeb.MainController do + use DrainCloudCoreWeb, :controller + + def test(conn, _params) do + conn + |> put_resp_content_type("application/json") + |> put_root_layout(false) + |> json(%{data: %{name: "Some Name"}}) + end + +end diff --git a/lib/draincloud_core_web/controllers/page_controller/page_controller.ex b/lib/draincloud_core_web/controllers/page_controller/page_controller.ex deleted file mode 100644 index 95589a3..0000000 --- a/lib/draincloud_core_web/controllers/page_controller/page_controller.ex +++ /dev/null @@ -1,26 +0,0 @@ -defmodule DrainCloudCoreWeb.PageController do - use DrainCloudCoreWeb, :controller - - def home(conn, _params) do - # The home page is often custom made, - # so skip the default app layout. - - # TODO - # 1. check is user is logged in - # 2. if is - fetch the main page contents (files, folders etc) - # 2.1 fetch session by token. If NotFOund -> (3) - # 2.2 fetch content by sessions user_id - # 2.3 render page - # If not: - # 3. Redirect to the login page - - # if Map.has_key?(conn.req_headers, 'x-access-token') do - # {_, token} = Map.fetch(conn.req_headers, 'x-access-token') - - # end - - :logger.debug("[#{__MODULE__}] request: ", conn) - - render(conn, :home, layout: false) - end -end diff --git a/lib/draincloud_core_web/controllers/page_controller/page_html.ex b/lib/draincloud_core_web/controllers/page_controller/page_html.ex deleted file mode 100644 index 7d0f998..0000000 --- a/lib/draincloud_core_web/controllers/page_controller/page_html.ex +++ /dev/null @@ -1,10 +0,0 @@ -defmodule DrainCloudCoreWeb.PageHTML do - @moduledoc """ - This module contains pages rendered by PageController. - - See the `page_html` directory for all templates available. - """ - use DrainCloudCoreWeb, :html - - embed_templates "page_html/*" -end diff --git a/lib/draincloud_core_web/controllers/page_controller/page_html/home.html.heex b/lib/draincloud_core_web/controllers/page_controller/page_html/home.html.heex deleted file mode 100644 index 658ec98..0000000 --- a/lib/draincloud_core_web/controllers/page_controller/page_html/home.html.heex +++ /dev/null @@ -1,17 +0,0 @@ -
- DrainCloud -
- \ No newline at end of file diff --git a/lib/draincloud_core_web/controllers/page_controller/page_html/login.html.heex b/lib/draincloud_core_web/controllers/page_controller/page_html/login.html.heex deleted file mode 100644 index 658ec98..0000000 --- a/lib/draincloud_core_web/controllers/page_controller/page_html/login.html.heex +++ /dev/null @@ -1,17 +0,0 @@ -
- DrainCloud -
- \ No newline at end of file diff --git a/lib/draincloud_core_web/router.ex b/lib/draincloud_core_web/router.ex index 49cf169..9ed3551 100644 --- a/lib/draincloud_core_web/router.ex +++ b/lib/draincloud_core_web/router.ex @@ -15,9 +15,9 @@ defmodule DrainCloudCoreWeb.Router do end scope "/", DrainCloudCoreWeb do - pipe_through :browser + pipe_through :api - get "/", PageController, :home + get "/api", MainController, :test end # Other scopes may use custom stacks. -- 2.45.2