Browse Source

Fix json naming of ProgramItem section_id to use camelCase

master
Alex Mikhalev 4 years ago
parent
commit
b5b87fe587
  1. 2
      src/database/migrations/0006-fix_view_program_seq-up.sql
  2. 1
      src/model/program.rs

2
src/database/migrations/0006-fix_view_program_seq-up.sql

@ -4,7 +4,7 @@ CREATE VIEW program_sequences AS
WITH psi_sorted AS ( WITH psi_sorted AS (
SELECT psi.program_id program_id, SELECT psi.program_id program_id,
json_object( json_object(
'section_id', psi.section_id, 'sectionId', psi.section_id,
'duration', psi.duration) 'duration', psi.duration)
obj obj
FROM program_sequence_items AS psi FROM program_sequence_items AS psi

1
src/model/program.rs

@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize};
use std::{sync::Arc, time::Duration}; use std::{sync::Arc, time::Duration};
#[derive(Debug, Clone, Serialize, Deserialize)] #[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ProgramItem { pub struct ProgramItem {
pub section_id: SectionId, pub section_id: SectionId,
#[serde( #[serde(

Loading…
Cancel
Save