From 66a61fff6675dea127571852eeed414262a73367 Mon Sep 17 00:00:00 2001 From: Joel C Date: Tue, 12 Nov 2019 11:22:06 +0100 Subject: [PATCH] Fix toolbar clear and delete, fixes #84 (#85) --- lib/lasso_web/live/lasso_liveview.ex | 4 ++-- mix.lock | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/lasso_web/live/lasso_liveview.ex b/lib/lasso_web/live/lasso_liveview.ex index a08ee3d..a32a8d2 100644 --- a/lib/lasso_web/live/lasso_liveview.ex +++ b/lib/lasso_web/live/lasso_liveview.ex @@ -27,13 +27,13 @@ defmodule LassoWeb.LassoLiveView do {:stop, redirect(socket, to: "/")} end - def handle_event("clear", uuid, socket) do + def handle_event("clear", _, %{assigns: %{uuid: uuid}} = socket) do Logger.info("Clearing requests for lasso with uuid: #{uuid}") socket = clear(socket, uuid) {:noreply, assign(socket, :requests, [])} end - def handle_event("delete", uuid, socket) do + def handle_event("delete", _, %{assigns: %{uuid: uuid}} = socket) do Logger.info("Deleting lasso with uuid: #{uuid}") socket = delete(socket, uuid) {:stop, redirect(socket, to: "/")} diff --git a/mix.lock b/mix.lock index 1dc3886..363c4ff 100644 --- a/mix.lock +++ b/mix.lock @@ -2,8 +2,8 @@ "basic_auth": {:hex, :basic_auth, "2.2.4", "d8c748237870dd1df3bc5c0f1ab4f1fad6270c75472d7e62b19302ec59e92a79", [:mix], [{:plug, "~> 0.14 or ~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"}, "bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm"}, "con_cache": {:hex, :con_cache, "0.14.0", "863acb90fa08017be3129074993af944cf7a4b6c3ee7c06c5cd0ed6b94fbc223", [:mix], [], "hexpm"}, - "cowboy": {:hex, :cowboy, "2.7.0", "91ed100138a764355f43316b1d23d7ff6bdb0de4ea618cb5d8677c93a7a2f115", [], [{:cowlib, "~> 2.8.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm"}, - "cowlib": {:hex, :cowlib, "2.8.0", "fd0ff1787db84ac415b8211573e9a30a3ebe71b5cbff7f720089972b2319c8a4", [], [], "hexpm"}, + "cowboy": {:hex, :cowboy, "2.7.0", "91ed100138a764355f43316b1d23d7ff6bdb0de4ea618cb5d8677c93a7a2f115", [:rebar3], [{:cowlib, "~> 2.8.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm"}, + "cowlib": {:hex, :cowlib, "2.8.0", "fd0ff1787db84ac415b8211573e9a30a3ebe71b5cbff7f720089972b2319c8a4", [:rebar3], [], "hexpm"}, "credo": {:hex, :credo, "1.1.5", "caec7a3cadd2e58609d7ee25b3931b129e739e070539ad1a0cd7efeeb47014f4", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm"}, "elixir_uuid": {:hex, :elixir_uuid, "1.2.1", "dce506597acb7e6b0daeaff52ff6a9043f5919a4c3315abb4143f0b00378c097", [:mix], [], "hexpm"}, "file_system": {:hex, :file_system, "0.2.7", "e6f7f155970975789f26e77b8b8d8ab084c59844d8ecfaf58cbda31c494d14aa", [:mix], [], "hexpm"},