fix xml?
This commit is contained in:
parent
88d47ef535
commit
3d4dae9515
@ -8,8 +8,10 @@ import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.util.MimeTypeUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.awt.datatransfer.MimeTypeParseException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@ -41,7 +43,7 @@ public class IndexController {
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/{id}", produces = "text/html")
|
||||
@GetMapping(value = "/{id}", produces = MimeTypeUtils.TEXT_HTML_VALUE)
|
||||
public String paste(@PathVariable String id, Model model) {
|
||||
try {
|
||||
Paste paste = pasteService.getPaste(id);
|
||||
@ -54,7 +56,7 @@ public class IndexController {
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping(value = "/raw/{id}", produces = "text/html")
|
||||
@GetMapping(value = "/raw/{id}", produces = MimeTypeUtils.TEXT_HTML_VALUE)
|
||||
public String pasteRaw(@PathVariable String id, Model model) {
|
||||
try {
|
||||
Paste paste = pasteService.getPaste(id);
|
||||
|
Reference in New Issue
Block a user