get '/' do
  @links = Link.desc('created_at').limit(10)

  erb :index
end

post '/' do
  link = Link.find_or_create_by(url: params[:url])

  redirect to('/')
end

get '/' do
  @links = Link.desc('created_at').limit(10)

  erb :index
end

post '/' do
  Link.find_or_create_by(url: params[:url])

  redirect to('/')
end

Remove unnecessary variable from POST / action
Remove unnecessary variable from POST / action
