Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
josh1248 committed Nov 13, 2024
1 parent 36a3a69 commit 9f7b6f3
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 10 deletions.
2 changes: 1 addition & 1 deletion lib/cadet/devices/devices.ex
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ defmodule Cadet.Devices do
},
300,
[],
''
~c""
)

# ExAws includes the session token in the signed payload and doesn't allow
Expand Down
10 changes: 7 additions & 3 deletions lib/cadet_web/admin_controllers/admin_assets_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule CadetWeb.AdminAssetsController do

case Assets.delete_object(Courses.assets_prefix(course_reg.course), foldername, filename) do
{:error, {status, message}} -> conn |> put_status(status) |> text(message)
_ -> conn |> put_status(204) |> text('')
_ -> conn |> put_status(204) |> text(~c"")
end
end

Expand Down Expand Up @@ -96,7 +96,9 @@ defmodule CadetWeb.AdminAssetsController do
parameters do
folderName(:path, :string, "Folder name", required: true)

fileName(:path, :string, "File path in folder, which may contain subfolders", required: true)
fileName(:path, :string, "File path in folder, which may contain subfolders",
required: true
)
end

security([%{JWT: []}])
Expand All @@ -115,7 +117,9 @@ defmodule CadetWeb.AdminAssetsController do
parameters do
folderName(:path, :string, "Folder name", required: true)

fileName(:path, :string, "File path in folder, which may contain subfolders", required: true)
fileName(:path, :string, "File path in folder, which may contain subfolders",
required: true
)
end

security([%{JWT: []}])
Expand Down
6 changes: 5 additions & 1 deletion lib/cadet_web/admin_controllers/admin_courses_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ defmodule CadetWeb.AdminCoursesController do
title("AdminSublanguage")

properties do
chapter(:integer, "Chapter number from 1 to 4", required: true, minimum: 1, maximum: 4)
chapter(:integer, "Chapter number from 1 to 4",
required: true,
minimum: 1,
maximum: 4
)

variant(Schema.ref(:SourceVariant), "Variant name", required: true)
end
Expand Down
6 changes: 3 additions & 3 deletions lib/cadet_web/admin_controllers/admin_stories_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defmodule CadetWeb.AdminStoriesController do

case result do
{:ok, _story} ->
conn |> put_status(200) |> text('')
conn |> put_status(200) |> text(~c"")

{:error, {status, message}} ->
conn
Expand All @@ -29,7 +29,7 @@ defmodule CadetWeb.AdminStoriesController do

case result do
{:ok, _story} ->
conn |> put_status(200) |> text('')
conn |> put_status(200) |> text(~c"")

{:error, {status, message}} ->
conn
Expand All @@ -43,7 +43,7 @@ defmodule CadetWeb.AdminStoriesController do

case result do
{:ok, _nil} ->
conn |> put_status(204) |> text('')
conn |> put_status(204) |> text(~c"")

{:error, {status, message}} ->
conn
Expand Down
4 changes: 3 additions & 1 deletion lib/cadet_web/admin_views/admin_assessments_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ defmodule CadetWeb.AdminAssessmentsView do
end

def render("leaderboard.json", %{leaderboard: leaderboard}) do
render_many(leaderboard, CadetWeb.AdminAssessmentsView, "contestEntry.json", as: :contestEntry)
render_many(leaderboard, CadetWeb.AdminAssessmentsView, "contestEntry.json",
as: :contestEntry
)
end

def render("contestEntry.json", %{contestEntry: contestEntry}) do
Expand Down
4 changes: 3 additions & 1 deletion lib/cadet_web/views/assessments_view.ex
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ defmodule CadetWeb.AssessmentsView do
end

def render("leaderboard.json", %{leaderboard: leaderboard}) do
render_many(leaderboard, CadetWeb.AdminAssessmentsView, "contestEntry.json", as: :contestEntry)
render_many(leaderboard, CadetWeb.AdminAssessmentsView, "contestEntry.json",
as: :contestEntry
)
end

def render("contestEntry.json", %{contestEntry: contestEntry}) do
Expand Down

0 comments on commit 9f7b6f3

Please sign in to comment.