Use created response
This commit is contained in:
parent
f678a77677
commit
60df748e6b
1 changed files with 1 additions and 1 deletions
2
app.rb
2
app.rb
|
@ -20,7 +20,7 @@ post '/jokes' do
|
||||||
@joke = Joke.new(params[:joke])
|
@joke = Joke.new(params[:joke])
|
||||||
|
|
||||||
if @joke.save
|
if @joke.save
|
||||||
status 204
|
status 201
|
||||||
else
|
else
|
||||||
status 422
|
status 422
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue