Create code posts
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user