Skip to content

Commit

Permalink
Fix API documentation for Campaign deliver/schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
wmnnd committed Jan 5, 2023
1 parent 896134c commit ce2a365
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/keila_web/api/controllers/api_campaign_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ defmodule KeilaWeb.ApiCampaignController do
end

operation(:deliver,
summary: "Delete Campaign",
summary: "Deliver Campaign",
parameters: [id: [in: :path, type: :string, description: "Campaign ID"]],
responses: %{
204 => "Campaign was deleted successfully or didn’t exist."
ok: {"Campaign response", "application/json", Schemas.MailingsCampaign.Response}
}
)

Expand All @@ -129,12 +129,12 @@ defmodule KeilaWeb.ApiCampaignController do
end

operation(:schedule,
summary: "Delete Campaign",
summary: "Schedule Campaign",
parameters: [id: [in: :path, type: :string, description: "Campaign ID"]],
request_body:
{"Campaign params", "application/json", Schemas.MailingsCampaign.ScheduleParams},
responses: %{
204 => "Campaign was deleted successfully or didn’t exist."
ok: {"Campaign response", "application/json", Schemas.MailingsCampaign.Response}
}
)

Expand Down
2 changes: 2 additions & 0 deletions lib/keila_web/router.ex
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ defmodule KeilaWeb.Router do
post "/campaigns/:id/actions/schedule", ApiCampaignController, :schedule

resources "/segments", ApiSegmentController, only: [:index, :show, :create, :update, :delete]

resources "/senders", ApiSenderController, only: [:index]
end

# Webhooks
Expand Down

0 comments on commit ce2a365

Please sign in to comment.