package Ġa lex a . app . bot . controller Ċ Ċ import Ġa lex a . app . bot . service . Channel Service Ċ import Ġa lex a . app . service . Auth Service Ċ import Ġa lex a . app . utils . Jwt Util Ċ import Ġfe ign . Headers Ċ import Ġorg . hibernate . byte code . Byte code Logger . LOGGER Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . http . Response Entity Ċ import Ġorg . springframework . web . bind . annotation .* Ċ import Ġjava . util . logging . Logger Ċ Ċ @ RestController Ċ @ RequestMapping (" v 1 / channel ") Ċ class ĠChannel Controller Ġ@ Autowired Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġchannel Service : ĠChannel Service , ĊĠĠĠ Ġprivate Ġval Ġauth Service : ĠAuth Service , ĊĠĠĠ Ġprivate Ġval Ġjwt Util : ĠJwt Util Ċ ) Ġ{ ĊĊĠĠĠ Ġval Ġlogger : ĠLogger Ġ= ĠLogger . getLogger ( Channel Controller :: class . java . name ) ĊĊĠĠĠ Ġ@ PostMapping ("/ cli ps ") ĊĠĠĠ Ġfun Ġcreate Clip ( ĊĠĠĠĠĠĠĠ Ġ@ Request Header (" Authorization ") Ġjwt : ĠString ĊĠĠĠ Ġ): ĠResponseEntity < Unit > Ġ{ ĊĊĠĠĠĠĠĠĠ Ġlogger . info (" POST Ġ-> Ġv 1 / channel / cli ps ") ĊĠĠĠĠĠĠĠ Ġlogger . info (" Cri ando Ġclip Ġpara Ġo ĠusuÃ¡rio Ġde Ġemail : Ġ${ jwt Util . decode ( jwt )} ") ĊĠĠĠĠĠĠĠ Ġreturn ĠResponseEntity . ok ( channel Service . create Clip ( auth Service . validate Token ByUser Email ( jwt Util . decode ( jwt )))) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ PostMapping ("/ commercial ") ĊĠĠĠ Ġfun Ġstart Com mercial ( ĊĠĠĠĠĠĠĠ Ġ@ Request Header (" Authorization ") Ġjwt : ĠString , ĊĠĠĠĠĠĠĠ Ġ@ Request Header (" seconds ") Ġseconds : ĠInt ? ĊĠĠĠ Ġ): ĠResponseEntity < Unit > Ġ{ ĊĊĠĠĠĠĠĠĠ Ġlogger . info (" POST Ġ-> Ġv 1 / channel / commercial ") ĊĠĠĠĠĠĠĠ Ġlogger . info (" Rod ando Ġcom erc ial Ġpara Ġo ĠusuÃ¡rio Ġde Ġemail : Ġ${ jwt Util . decode ( jwt )} ") ĊĠĠĠĠĠĠĠ Ġreturn ĠResponseEntity . ok ( channel Service . start Com mercial ( auth Service . validate Token ByUser Email ( jwt Util . decode ( jwt )), Ġseconds )) ĊĠĠĠ Ġ} Ċ }