Skip to content

Commit

Permalink
fix graph types for postgres endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas-Heiligenbrunner committed Feb 15, 2025
1 parent 3d17c3f commit cba5954
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions backend/src/api/models/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ pub struct ListStats {

#[derive(FromQueryResult, Deserialize, ToSchema, Serialize)]
pub struct GraphDataPoint {
pub month: u8,
pub year: u16,
pub count: u32,
pub month: i32,
pub year: i32,
pub count: i32,
}

#[derive(FromQueryResult, Deserialize, ToSchema, Serialize)]
Expand Down
2 changes: 1 addition & 1 deletion backend/src/api/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ORDER BY
"SELECT
EXTRACT(YEAR FROM to_timestamp(start_time))::INTEGER AS year,
EXTRACT(MONTH FROM to_timestamp(start_time))::INTEGER AS month,
COUNT(*) AS count
COUNT(*)::INTEGER AS count
FROM
builds
WHERE
Expand Down

0 comments on commit cba5954

Please sign in to comment.