Refactor Core things, including Ecto handling, ActivityPub & Transmogrifier modules
* Data doesn't need anymore to be converted to ActivityStream format to be saved (this was taken from Pleroma and not at all a good idea here) * Everything saved when creating an event is inserted into PostgreSQL in a single transaction
This commit is contained in:
@@ -35,7 +35,7 @@ defmodule MobilizonWeb.Schema.CommentType do
|
||||
@desc "Create a comment"
|
||||
field :create_comment, type: :comment do
|
||||
arg(:text, non_null(:string))
|
||||
arg(:actor_username, non_null(:string))
|
||||
arg(:actor_id, non_null(:id))
|
||||
|
||||
resolve(&Comment.create_comment/3)
|
||||
end
|
||||
|
||||
@@ -63,7 +63,7 @@ defmodule MobilizonWeb.Schema.EventType do
|
||||
|
||||
field(:draft, :boolean, description: "Whether or not the event is a draft")
|
||||
|
||||
field(:participant_stats, :participant_stats, resolve: &Event.stats_participants_for_event/3)
|
||||
field(:participant_stats, :participant_stats)
|
||||
|
||||
field(:participants, list_of(:participant), description: "The event's participants") do
|
||||
arg(:page, :integer, default_value: 1)
|
||||
@@ -112,13 +112,21 @@ defmodule MobilizonWeb.Schema.EventType do
|
||||
end
|
||||
|
||||
object :participant_stats do
|
||||
field(:approved, :integer, description: "The number of approved participants")
|
||||
field(:unapproved, :integer, description: "The number of unapproved participants")
|
||||
field(:going, :integer,
|
||||
description: "The number of approved participants",
|
||||
resolve: &Event.stats_participants_going/3
|
||||
)
|
||||
|
||||
field(:not_approved, :integer, description: "The number of not approved participants")
|
||||
field(:rejected, :integer, description: "The number of rejected participants")
|
||||
|
||||
field(:participants, :integer,
|
||||
field(:participant, :integer,
|
||||
description: "The number of simple participants (excluding creators)"
|
||||
)
|
||||
|
||||
field(:moderator, :integer, description: "The number of moderators")
|
||||
field(:administrator, :integer, description: "The number of administrators")
|
||||
field(:creator, :integer, description: "The number of creators")
|
||||
end
|
||||
|
||||
object :event_offer do
|
||||
|
||||
Reference in New Issue
Block a user