Handle empty comments

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-03-25 12:11:49 +01:00
parent b95b3c16e7
commit 968a965763
4 changed files with 28 additions and 6 deletions

View File

@@ -42,6 +42,9 @@ defmodule Mobilizon.GraphQL.Resolvers.Comment do
Comments.create_comment(args) do
{:ok, comment}
else
{:error, err} ->
{:error, err}
{:allowed, false} ->
{:error, :unauthorized}
end