Skip to content

Commit c1d1db1

Browse files
committed
feat: update ref page
1 parent a4e46c6 commit c1d1db1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ssr/api.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ pub async fn select_references() -> Result<Vec<Reference>, ServerFnError> {
160160

161161
let AppState { db, .. } = expect_context::<AppState>();
162162

163-
let query = "SELECT * from reference WHERE is_published = true ORDER BY created_at DESC;";
163+
let query = "SELECT * from reference WHERE is_published = true ORDER BY year DESC;";
164164
let query = db.query(query).await;
165165

166166
if let Err(e) = query {

src/ssr/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub struct Reference {
7777
pub created_at: String,
7878
pub updated_at: String,
7979
pub is_published: bool,
80-
pub year: Option<u16>,
80+
pub year: Option<String>,
8181
pub category: Option<String>,
8282
pub icon: Option<String>,
8383
}

0 commit comments

Comments
 (0)