Cosmetic refactoring
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
|
||||
package io.kamax.mxisd.controller.v1;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonObject;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -30,10 +32,18 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RequestMapping(produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
||||
public class StatusController {
|
||||
|
||||
private Gson gson = new Gson();
|
||||
|
||||
@RequestMapping(value = "/_matrix/identity/status")
|
||||
public String getStatus() {
|
||||
// TODO link to backend
|
||||
return "{\"status\":{\"health\":\"OK\"}}";
|
||||
JsonObject status = new JsonObject();
|
||||
status.addProperty("health", "OK");
|
||||
|
||||
JsonObject obj = new JsonObject();
|
||||
obj.add("status", status);
|
||||
|
||||
return gson.toJson(obj);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user