Create code posts

This commit is contained in:
2024-03-04 21:34:12 +11:00
parent 4277bde352
commit 56edde6ab5
13 changed files with 155 additions and 53 deletions

View File

@@ -34,7 +34,7 @@ module Micropub
# create
if req_entity && verify_scope(req: req, scope: :create)
Dry::Matcher::ResultMatcher.(create_entry.call(req_entity: req_entity)) do |m|
Dry::Matcher::ResultMatcher.call(create_entry.call(req_entity: req_entity)) do |m|
m.success do |post|
res.headers["Location"] = "#{settings.micropub_site_url}/#{post.value!.post_type}/#{post.value!.slug}"
res.status = 201