Standard rb fixes
This commit is contained in:
@@ -8,9 +8,8 @@ module Admin
|
||||
|
||||
def handle(req, res)
|
||||
add_syndication_source.call(post_id: req.params[:id],
|
||||
source_name: req.params[:syndication_source_name],
|
||||
source_url: req.params[:syndication_source_url]
|
||||
)
|
||||
source_name: req.params[:syndication_source_name],
|
||||
source_url: req.params[:syndication_source_url])
|
||||
|
||||
res.status = 201
|
||||
res.headers["HX-Refresh"] = true
|
||||
|
@@ -5,7 +5,7 @@ module Admin
|
||||
include Deps["commands.posts.update"]
|
||||
|
||||
def handle(req, res)
|
||||
update.(params: req.params)
|
||||
update.call(params: req.params)
|
||||
res.redirect "/admin/posts/#{req.params[:id]}"
|
||||
end
|
||||
end
|
||||
|
@@ -3,8 +3,8 @@ module Admin
|
||||
module Posts
|
||||
class Update
|
||||
include Deps[
|
||||
"repos.post_repo",
|
||||
"renderers.markdown"
|
||||
"repos.post_repo",
|
||||
"renderers.markdown"
|
||||
]
|
||||
|
||||
def call(params:)
|
||||
|
@@ -7,7 +7,7 @@ module Admin
|
||||
|
||||
expose :photos_buckets do |available_paths|
|
||||
available_paths.each_with_object({}) do |root, memo|
|
||||
memo[root.gsub(MEDIA_DIR, "")] = Dir["#{root}/**"].sort {|a,b| File.ctime(b) <=> File.ctime(a) }
|
||||
memo[root.gsub(MEDIA_DIR, "")] = Dir["#{root}/**"].sort { |a, b| File.ctime(b) <=> File.ctime(a) }
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user