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

@@ -7,10 +7,12 @@ module Micropub
"validation.posts.bookmark_contract",
"validation.posts.checkin_contract",
"validation.posts.book_contract",
"validation.posts.code_contract",
"commands.posts.create_post",
"commands.posts.create_bookmark",
"commands.posts.create_checkin",
"commands.posts.create_book_post"
"commands.posts.create_book_post",
"commands.posts.create_code_post"
]
def call(entry_type:)
@@ -21,6 +23,8 @@ module Micropub
{command: create_checkin, validation: checkin_contract}
in Entities::BookRequest
{command: create_book_post, validation: book_contract}
in Entities::CodeRequest
{command: create_code_post, validation: code_contract}
else
{command: create_post, validation: post_contract}
end