add query and data types in prep for bulk record json response
This commit is contained in:
parent
29936813f0
commit
923103c5ef
3 changed files with 19 additions and 0 deletions
6
queries/records/get_records.sql
Normal file
6
queries/records/get_records.sql
Normal file
|
@ -0,0 +1,6 @@
|
|||
SELECT
|
||||
cache_name,
|
||||
uploaded,
|
||||
downloads,
|
||||
max_downloads
|
||||
FROM records;
|
7
queries/records/get_records_page.sql
Normal file
7
queries/records/get_records_page.sql
Normal file
|
@ -0,0 +1,7 @@
|
|||
SELECT
|
||||
cache_name,
|
||||
uploaded,
|
||||
downloads,
|
||||
max_downloads
|
||||
FROM records
|
||||
LIMIT ? OFFSET ?;
|
|
@ -39,6 +39,12 @@ pub struct DownloadLinkFragment {
|
|||
pub record: UploadRecord,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "link.html", block = "downloads_remaining")]
|
||||
pub struct DownloadsRemainingFragment {
|
||||
pub record: UploadRecord,
|
||||
}
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "linklist.html")]
|
||||
pub struct LinkListTemplate {
|
||||
|
|
Loading…
Reference in a new issue