Skip to content

Commit 9547700

Browse files
committed
response with full url on store
1 parent 37d2581 commit 9547700

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/controllers/links_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def store
88
@link = Link.create!(link_params)
99

1010
if @link.valid?
11+
@link.shortened = "#{request.base_url}/#{@link.shortened}"
1112
json_response(@link, :created)
1213
end
1314
end

0 commit comments

Comments
 (0)