Permalink
Browse files

Create a post from postmark

  • Loading branch information...
1 parent 94a8074 commit a2ba0cdd3929296c5dc3d3b8dc7d9a0f4ff5e13e @r38y committed Apr 18, 2011
Showing with 13 additions and 0 deletions.
  1. +13 −0 app/controllers/api/posts_controller.rb
@@ -0,0 +1,13 @@
+class Api::PostsController < ApplicationController
+ def create
+ # make sure the thing posting has rights to post here... maybe with
+ # http basic auth or a super secret token
+
+ Post.create_from_postmark(Postmark::Mitt.new(request.body.read))
+
+ # do a bunch of stuff like send an email back if the user can't be
+ # found, doesn't exist, etc.
+
+ render :text => "Created a post!", :status => :created
+ end
+end

0 comments on commit a2ba0cd

Please sign in to comment.