Add source response

This commit is contained in:
2023-02-03 11:16:31 +11:00
parent dd31388c2c
commit 19fe581c79
5 changed files with 54 additions and 4 deletions

View File

@@ -2,10 +2,12 @@ module Adamantium
module Commands
module Posts
class Update < Command
def call(params)
slug = URI(params[:url]).path.split("/").last
include Deps["repos.post_repo"]
post_repo.update(slug, params)
def call(params:)
slug = URI(params[:url]).path.split("/").last
post = post_repo.fetch!(slug)
post_repo.update(post.id, params)
end
end
end