mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-09-20 18:15:56 +08:00
Improve warning when editing localhost Hub
This commit is contained in:
parent
eccc165a2f
commit
693ea8e0f8
|
@ -128,7 +128,7 @@ defmodule LivebookWeb.HubLive do
|
||||||
@impl true
|
@impl true
|
||||||
def handle_params(%{"id" => "local-host"}, _url, socket) do
|
def handle_params(%{"id" => "local-host"}, _url, socket) do
|
||||||
{:noreply,
|
{:noreply,
|
||||||
put_flash(socket, :warning, "This is a localhost Hub, you shouldn't be able to edit")}
|
socket |> redirect(to: "/") |> put_flash(:warning, "You can't edit the localhost Hub")}
|
||||||
end
|
end
|
||||||
|
|
||||||
def handle_params(%{"id" => id}, _url, socket) do
|
def handle_params(%{"id" => id}, _url, socket) do
|
||||||
|
|
Loading…
Reference in a new issue