package Ġcom . jy od roid . pag an in is ound s . controllers Ċ Ċ import Ġcom . jy od roid . pag an in is ound s . model . Song Ċ import Ġorg . springframework . web . bind . annotation . Cross Origin Ċ import Ġorg . springframework . web . bind . annotation . GetMapping Ċ import Ġorg . springframework . web . bind . annotation . RequestParam Ċ import Ġorg . springframework . web . bind . annotation . RestController Ċ Ċ @ Cross Origin ( max Age Ġ= Ġ 3 6 0 0 ) Ċ @ RestController Ċ class ĠS ongs Controller Ġ{ ĊĠĠĠ Ġval Ġun w atched Videos Ġ= ĠlistOf ( ĊĠĠĠĠĠĠĠ ĠSong ( 1 , Ġ" Cap rice Ġ 2 4 ", Ġ" Alex andro x ĠX andro x ", Ġ" https :// www . youtube . com / watch ? v = Cj Dz - r 6 5 x UU "), ĊĠĠĠĠĠĠĠ ĠSong ( 2 , Ġ" Cap rice Ġ 5 ", Ġ" Sum ina ĠSt uder ", Ġ" https :// www . youtube . com / watch ? v = 0 j XX WB t 5 UR w "), ĊĠĠĠĠĠĠĠ ĠSong ( 3 , Ġ" La ĠCamp an ella ", Ġ" St ef an ĠMil enk ov ich ", Ġ" https :// www . youtube . com / watch ? v = 2 3 0 Rg L ax -_ o ") ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġval Ġw atched Videos Ġ= ĠlistOf ( ĊĠĠĠĠĠĠĠ ĠSong ( 4 , Ġ" Al leg ro Ġma est oso ", Ġ" Step an ĠG ry ts ay ", Ġ" https :// www . youtube . com / watch ? v = L 1 Je OD 0 xv uc ") ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġ@ Cross Origin ( value Ġ= Ġ[" http :// localhost : 8 0 8 0 "]) ĊĠĠĠ Ġ@ GetMapping ("/ songs ") ĊĠĠĠ Ġfun Ġget Song (@ RequestParam ( value Ġ= Ġ" type ", ĠdefaultValue Ġ= Ġ" w atched ") Ġtype : ĠString ): ĠList < Song > Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( type Ġ== Ġ" un w atched ") Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġun w atched Videos ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġreturn Ġw atched Videos ĊĠĠĠ Ġ} Ċ }