package Ġeu . mg me iner . lot to z ah len api . draw Ċ Ċ import Ġorg . springframework . context . annotation . Bean Ċ import Ġorg . springframework . context . annotation . Configuration Ċ import Ġorg . springframework . http . HttpStatus Ċ import Ġorg . springframework . http . MediaType Ċ import Ġorg . springframework . web . reactive . function . server . Server Response . ok Ċ import Ġorg . springframework . web . reactive . function . server . Server Response . status Ċ import Ġorg . springframework . web . reactive . function . server . router Ċ Ċ @ Configuration Ċ class ĠL otto Draw Routes Ġ{ ĊĠĠĠ Ġ@ Bean ĊĠĠĠ Ġfun Ġlot to z ah len Routes Provider ( lot to Draw Service : ĠL otto Draw Service ) Ġ= Ġrouter Ġ{ ĊĠĠĠĠĠĠĠ ĠGET ("/") Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġlatest Ġ= Ġlot to Draw Service . get Latest () ĊĊĠĠĠĠĠĠĠĠĠĠĠ Ġlatest . flatMap Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġok (). contentType ( MediaType . APPLICATION _ JSON ). body ( latest , ĠL otto Draw Model :: class . java ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ}. switch If Empty ( status ( HttpStatus . NOT _ FOUND ). contentType ( MediaType . TEXT _ PLAIN ). sync Body (" no Ġ' Lot to z ah len ' Ġavailable ")) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }