mirror of
https://gitlab.com/etc404/software-engineering-project.git
synced 2026-05-10 20:52:58 +00:00
24 lines
628 B
Java
24 lines
628 B
Java
package com.example.demo.controller;
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import java.time.LocalDateTime;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
@RestController
|
|
public class HealthController {
|
|
|
|
@GetMapping("/api/health")
|
|
public Map<String, Object> healthCheck() {
|
|
Map<String, Object> response = new HashMap<>();
|
|
|
|
response.put("status", "UP");
|
|
response.put("timestamp", LocalDateTime.now());
|
|
response.put("service", "Recipe Backend");
|
|
|
|
return response;
|
|
}
|
|
}
|