add query and data types in prep for bulk record json response

This commit is contained in:
Zynh Ludwig 2024-11-21 10:19:16 -08:00
parent 29936813f0
commit 923103c5ef
3 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,6 @@
SELECT
cache_name,
uploaded,
downloads,
max_downloads
FROM records;

View file

@ -0,0 +1,7 @@
SELECT
cache_name,
uploaded,
downloads,
max_downloads
FROM records
LIMIT ? OFFSET ?;

View file

@ -39,6 +39,12 @@ pub struct DownloadLinkFragment {
pub record: UploadRecord, pub record: UploadRecord,
} }
#[derive(Template)]
#[template(path = "link.html", block = "downloads_remaining")]
pub struct DownloadsRemainingFragment {
pub record: UploadRecord,
}
#[derive(Template)] #[derive(Template)]
#[template(path = "linklist.html")] #[template(path = "linklist.html")]
pub struct LinkListTemplate { pub struct LinkListTemplate {