create-json #21

Merged
bucky merged 14 commits from create-json into master 2023-10-12 14:36:38 -07:00
Showing only changes of commit cabb4daded - Show all commits
+7 -2
View File
@@ -50,9 +50,14 @@ class App < Roda
end
url = r.params['url']
if url.nil? or url.empty?
if url.nil?
response.status = 400
return {message: "Please enter a valid URL"}
return {message: "missing url parameter"}.to_json
end
if url.empty?
response.status = 400
return {message: "invalid url parameter"}.to_json
end
if links.filter(:url => url).first.nil?