Archived
Implementation of post deletion.
This commit is contained in:
@@ -17,6 +17,7 @@ import org.codiki.core.repositories.PostRepository;
|
||||
import org.codiki.core.security.TokenService;
|
||||
import org.codiki.core.services.ParserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -131,4 +132,10 @@ public class PostController {
|
||||
final HttpServletResponse pResponse) throws IOException {
|
||||
postService.update(pPost, pRequest, pResponse);
|
||||
}
|
||||
|
||||
@DeleteMapping("/{postKey}")
|
||||
public void delete(@PathVariable("postKey") final String pPostKey,
|
||||
final HttpServletRequest pRequest, final HttpServletResponse pResponse) throws IOException {
|
||||
postService.delete(pPostKey, pRequest, pResponse);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user