Refactor adding tags to an event
Also refactor extracting tags from content, now uses Pleroma's Formatter Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -2,7 +2,7 @@ defmodule MobilizonWeb.Resolvers.Tag do
|
||||
@moduledoc """
|
||||
Handles the tag-related GraphQL calls
|
||||
"""
|
||||
require Logger
|
||||
alias Mobilizon.Events
|
||||
alias Mobilizon.Events.Event
|
||||
alias Mobilizon.Events.Tag
|
||||
|
||||
@@ -19,6 +19,15 @@ defmodule MobilizonWeb.Resolvers.Tag do
|
||||
{:ok, Mobilizon.Events.list_tags_for_event(id)}
|
||||
end
|
||||
|
||||
@doc """
|
||||
Retrieve the list of tags for an event
|
||||
"""
|
||||
def list_tags_for_event(%{url: url}, _args, _resolution) do
|
||||
with %Event{id: event_id} <- Events.get_event_by_url(url) do
|
||||
{:ok, Mobilizon.Events.list_tags_for_event(event_id)}
|
||||
end
|
||||
end
|
||||
|
||||
# @doc """
|
||||
# Retrieve the list of related tags for a given tag ID
|
||||
# """
|
||||
|
||||
Reference in New Issue
Block a user