mirror of
https://github.com/danbee/micropub.git
synced 2025-03-04 08:59:13 +00:00
21 lines
229 B
Ruby
21 lines
229 B
Ruby
require "sinatra"
|
|
require "sinatra/json"
|
|
|
|
require "./lib/post"
|
|
|
|
post "/micropub" do
|
|
verify_token
|
|
|
|
post = Post.new(params)
|
|
|
|
if post.save!
|
|
status 201
|
|
else
|
|
status 400
|
|
end
|
|
end
|
|
|
|
def verify_token
|
|
# verify token
|
|
end
|