package edu.wgu.d387_sample_code.Timezones;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin(origins = "http://localhost:4200")
@RestController
public class TimeZoneController {

    @GetMapping("/live")
    public ResponseEntity<String> livePresentation() {
        String times = "Please join us LIVE for an online presentation starting: " + TimeConverter.getTime();
        return new ResponseEntity<String>(times, HttpStatus.OK);
    }
}
