Small code cleanups

This commit is contained in:
Alexander Olofsson 2024-10-18 07:32:36 +02:00
parent 22b7208bdd
commit 59a6b333d4
Signed by: ace
GPG key ID: D439C9470CB04C73
3 changed files with 3 additions and 4 deletions

View file

@ -50,7 +50,7 @@ module FicTracker::Backends::Ao3
name:, name:,
url: url&.to_s, url: url&.to_s,
image: image&.to_s, image: image&.to_s,
last_metadata_refresh: Time.now last_metadata_refresh: Time.now,
) )
end end

View file

@ -1,6 +1,5 @@
# frozen_string_literal: true # frozen_string_literal: true
require 'cgi'
require 'net/http' require 'net/http'
require 'nokogiri' require 'nokogiri'
require 'json' require 'json'
@ -13,7 +12,7 @@ module FicTracker::Backends::Ao3
URI(BASE_URL) URI(BASE_URL)
end end
def request(path, type: :html, body: nil, query: nil, method: :get, redirect: true) def request(path, type: :html, body: nil, query: nil, method: :get)
uri = URI.join(url, path) uri = URI.join(url, path)
uri.query = URI.encode_www_form(query) if query uri.query = URI.encode_www_form(query) if query

View file

@ -120,7 +120,7 @@ Sequel.migration do
String :data, null: false, text: true, default: '{}' String :data, null: false, text: true, default: '{}'
end end
if false if false # multi_user
create_table(:users) do create_table(:users) do
primary_key :id primary_key :id