fix(map): Show a proper user notification if map was deleted/archived

This commit is contained in:
Dmitry Popov
2024-09-21 13:16:04 +04:00
parent 6039ac5d4f
commit 501dbcd76b
@@ -64,6 +64,18 @@ defmodule WandererAppWeb.MapLive do
timeout: 2000
})
{:ok,
%{
deleted: true
} = map} ->
socket
|> put_flash(
:error,
"Map was deleted by owner or administrator."
)
|> push_navigate(to: ~p"/maps")
{:error, _} ->
socket
|> put_flash(
@@ -1589,6 +1601,7 @@ defmodule WandererAppWeb.MapLive do
:character_eve_id,
:name,
:description,
:custom_info,
:kind,
:group,
:updated_at
@@ -1796,6 +1809,7 @@ defmodule WandererAppWeb.MapLive do
eve_id: eve_id,
name: name,
description: Map.get(signature, "description"),
custom_info: Map.get(signature, "custom_info"),
kind: kind,
group: group,
character_eve_id: character_eve_id