Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
vrsandeep committed Dec 20, 2024
1 parent 9e81360 commit 14c48a7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ test:
crystal spec

check:
#crystal tool format --check
crystal tool format; git diff --exit-code
#crystal tool format; git diff --exit-code
crystal tool format --check
./bin/ameba
yarn lint

Expand Down
2 changes: 1 addition & 1 deletion src/routes/admin.cr
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct AdminRouter
redirect_url = URI.new \
path: "/admin/user/edit",
query: hash_to_query({"username" => original_username, \
"admin" => admin, "error" => e.message})
"admin" => admin, "error" => e.message})
redirect env, redirect_url.to_s
end

Expand Down
3 changes: 1 addition & 2 deletions src/routes/api.cr
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,7 @@ struct APIRouter
raise "Entry ID `#{eid}` of `#{title.title}` not found" if entry.nil?

img = entry.get_thumbnail || entry.read_page 1
raise "Failed to get cover of `#{title.title}/#{entry.title}`" \
if img.nil?
raise "Failed to get cover of `#{title.title}/#{entry.title}`" if img.nil?

e_tag = Digest::SHA1.hexdigest img.data
if prev_e_tag == e_tag
Expand Down
6 changes: 3 additions & 3 deletions src/util/web.cr
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ end

macro cors
env.response.headers["Access-Control-Allow-Methods"] = "HEAD,GET,PUT,POST," \
"DELETE,OPTIONS"
"DELETE,OPTIONS"
env.response.headers["Access-Control-Allow-Headers"] = "X-Requested-With," \
"X-HTTP-Method-Override, Content-Type, Cache-Control, Accept," \
"Authorization"
"X-HTTP-Method-Override, Content-Type, Cache-Control, Accept," \
"Authorization"
env.response.headers["Access-Control-Allow-Origin"] = "*"
end

Expand Down

0 comments on commit 14c48a7

Please sign in to comment.