Rename Entries to ArchiveEntry and DirEntry

This commit is contained in:
Leeingnyo
2022-05-20 09:51:56 +09:00
parent f18f6a5418
commit 1f5aed64f7
4 changed files with 20 additions and 20 deletions
+3 -3
View File
@@ -142,7 +142,7 @@ struct APIRouter
env.response.status_code = 304
""
else
if entry.is_a? DirectoryEntry
if entry.is_a? DirEntry
cache_control = "no-cache, max-age=86400"
else
cache_control = "public, max-age=86400"
@@ -1143,7 +1143,7 @@ struct APIRouter
entry = title.get_entry eid
raise "Entry ID `#{eid}` of `#{title.title}` not found" if entry.nil?
if entry.is_a? DirectoryEntry
if entry.is_a? DirEntry
file_hash = Digest::SHA1.hexdigest(entry.path + entry.mtime.to_s + entry.size)
else
file_hash = Digest::SHA1.hexdigest(entry.path + entry.mtime.to_s)
@@ -1154,7 +1154,7 @@ struct APIRouter
send_text env, ""
else
sizes = entry.page_dimensions
if entry.is_a? DirectoryEntry
if entry.is_a? DirEntry
cache_control = "no-cache, max-age=86400"
else
cache_control = "public, max-age=86400"