Skip to content
Snippets Groups Projects
Commit 62000131 authored by Ludovic Claude's avatar Ludovic Claude
Browse files

Fix response for /mining

parent ccff7455
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import akka.actor.ActorSelection;
import akka.actor.ActorSystem;
import akka.pattern.Patterns;
import akka.util.Timeout;
import com.google.gson.Gson;
import eu.hbp.mip.model.Mining;
import eu.hbp.mip.woken.messages.external.QueryResult;
import io.swagger.annotations.Api;
......@@ -35,6 +36,7 @@ import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
public class MiningApi {
private static final Logger LOGGER = Logger.getLogger(MiningApi.class);
private static final Gson gson = new Gson();
@Autowired
public ActorSystem actorSystem;
......@@ -74,7 +76,7 @@ public class MiningApi {
Date.from(result.timestamp().toInstant()),
result.data().get()
);
return ResponseEntity.ok(mining.jsonify());
return ResponseEntity.ok(gson.toJson(mining.jsonify()));
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment