From 9b18d5186d9fc3d34f47470b3e40aaf17af33360 Mon Sep 17 00:00:00 2001 From: SphericalKat Date: Thu, 7 Oct 2021 05:42:24 +0530 Subject: [PATCH] refactor(paste): switch to heex templates Signed-off-by: SphericalKat --- lib/ketbin_web/controllers/user_session_controller.ex | 2 ++ lib/ketbin_web/controllers/user_settings_controller.ex | 1 + .../templates/paste/{edit.html.eex => edit.html.heex} | 0 .../templates/paste/{form.html.eex => form.html.heex} | 0 .../templates/paste/{index.html.eex => index.html.heex} | 0 lib/ketbin_web/templates/paste/{new.html.eex => new.html.heex} | 0 .../templates/paste/{show.html.eex => show.html.heex} | 0 7 files changed, 3 insertions(+) rename lib/ketbin_web/templates/paste/{edit.html.eex => edit.html.heex} (100%) rename lib/ketbin_web/templates/paste/{form.html.eex => form.html.heex} (100%) rename lib/ketbin_web/templates/paste/{index.html.eex => index.html.heex} (100%) rename lib/ketbin_web/templates/paste/{new.html.eex => new.html.heex} (100%) rename lib/ketbin_web/templates/paste/{show.html.eex => show.html.heex} (100%) diff --git a/lib/ketbin_web/controllers/user_session_controller.ex b/lib/ketbin_web/controllers/user_session_controller.ex index 97801c2..bc30e08 100644 --- a/lib/ketbin_web/controllers/user_session_controller.ex +++ b/lib/ketbin_web/controllers/user_session_controller.ex @@ -22,5 +22,7 @@ defmodule KetbinWeb.UserSessionController do conn |> put_flash(:info, "Logged out successfully.") |> UserAuth.log_out_user() + + conn end end diff --git a/lib/ketbin_web/controllers/user_settings_controller.ex b/lib/ketbin_web/controllers/user_settings_controller.ex index b7608ca..76d3a2f 100644 --- a/lib/ketbin_web/controllers/user_settings_controller.ex +++ b/lib/ketbin_web/controllers/user_settings_controller.ex @@ -45,6 +45,7 @@ defmodule KetbinWeb.UserSettingsController do |> put_session(:user_return_to, Routes.user_settings_path(conn, :edit)) |> UserAuth.log_in_user(user) + conn {:error, changeset} -> render(conn, "edit.html", password_changeset: changeset) end diff --git a/lib/ketbin_web/templates/paste/edit.html.eex b/lib/ketbin_web/templates/paste/edit.html.heex similarity index 100% rename from lib/ketbin_web/templates/paste/edit.html.eex rename to lib/ketbin_web/templates/paste/edit.html.heex diff --git a/lib/ketbin_web/templates/paste/form.html.eex b/lib/ketbin_web/templates/paste/form.html.heex similarity index 100% rename from lib/ketbin_web/templates/paste/form.html.eex rename to lib/ketbin_web/templates/paste/form.html.heex diff --git a/lib/ketbin_web/templates/paste/index.html.eex b/lib/ketbin_web/templates/paste/index.html.heex similarity index 100% rename from lib/ketbin_web/templates/paste/index.html.eex rename to lib/ketbin_web/templates/paste/index.html.heex diff --git a/lib/ketbin_web/templates/paste/new.html.eex b/lib/ketbin_web/templates/paste/new.html.heex similarity index 100% rename from lib/ketbin_web/templates/paste/new.html.eex rename to lib/ketbin_web/templates/paste/new.html.heex diff --git a/lib/ketbin_web/templates/paste/show.html.eex b/lib/ketbin_web/templates/paste/show.html.heex similarity index 100% rename from lib/ketbin_web/templates/paste/show.html.eex rename to lib/ketbin_web/templates/paste/show.html.heex