Fixed a lot of linter warnings
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# /test routes
|
||||
class GameData < Sinatra::Base
|
||||
|
||||
get '/test' do
|
||||
tests = Test.reverse(:updated_at).limit(10).all()
|
||||
|
||||
@@ -30,19 +34,16 @@ class GameData < Sinatra::Base
|
||||
date_tag = params[:test_date_tag]
|
||||
|
||||
# make sure the date tag field is formatting properly
|
||||
unless date_tag.start_with?('(')
|
||||
date_tag = '(' + date_tag
|
||||
end
|
||||
unless date_tag.end_with?(')')
|
||||
date_tag = date_tag + ')'
|
||||
end
|
||||
date_tag = "(#{date_tag}" unless date_tag.start_with?('(')
|
||||
date_tag += ')' unless date_tag.end_with?(')')
|
||||
|
||||
test = Test.create(
|
||||
date_tag: params[:test_date_tag],
|
||||
date_tag: date_tag,
|
||||
hardware_id: params[:test_hardware],
|
||||
benchmark_id: params[:test_benchmark]
|
||||
)
|
||||
|
||||
redirect "/test/#{test.id}"
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user