package de.tum.in.www1.artemis.web.rest;

import java.time.Instant;

import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TimeResource {

    /**
     * {@code GET /time}:
     * @return the current server time as Instant
     */
    @GetMapping(value = "/time", produces = MediaType.TEXT_PLAIN_VALUE)
    public String time() {
        return Instant.now().toString();
    }
}

@@ -94,25 +94,30 @@
 rk.http.
-MediaType
+ResponseEntity
 ;%0Aimport
@@ -390,81 +390,51 @@
 ing(
-value = %22/time%22, produces = MediaType.TEXT_PLAIN_VALUE)%0A    public String
+%22/time%22)%0A    public ResponseEntity%3CInstant%3E
  tim
@@ -454,16 +454,34 @@
  return 
+ResponseEntity.ok(
 Instant.
@@ -489,18 +489,8 @@
 ow()
-.toString(
 );%0A 

Fix "/time" not returning JSON string