Api::AsciicastsController
parent
268d4b1660
commit
59dbd5aea3
@ -0,0 +1,14 @@
|
|||||||
|
class Api::AsciicastsController < ApplicationController
|
||||||
|
skip_before_filter :verify_authenticity_token
|
||||||
|
|
||||||
|
def create
|
||||||
|
ac = Asciicast.new(params[:asciicast])
|
||||||
|
|
||||||
|
if ac.save
|
||||||
|
render :text => asciicast_url(ac), :status => 201
|
||||||
|
else
|
||||||
|
render :text => ac.errors.full_messages, :status => 422
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe Api::AsciicastsController do
|
||||||
|
|
||||||
|
end
|
Loading…
Reference in New Issue