Class ArticlesController
java.lang.Object
edu.ucsb.cs156.example.controllers.ApiController
edu.ucsb.cs156.example.controllers.ArticlesController
@RequestMapping("/api/articles")
@RestController
public class ArticlesController
extends ApiController
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptiondeleteArticle(Long id) postArticles(String title, String url, String explanation, String email, LocalDateTime dateAdded) updateArticles(Long id, @Valid Articles incoming) Methods inherited from class edu.ucsb.cs156.example.controllers.ApiController
genericMessage, getCurrentUser, handleGenericException 
- 
Constructor Details
- 
ArticlesController
public ArticlesController() 
 - 
 - 
Method Details
- 
allArticles
 - 
postArticles
@PreAuthorize("hasRole(\'ROLE_ADMIN\')") @PostMapping("/post") public Articles postArticles(@RequestParam String title, @RequestParam String url, @RequestParam String explanation, @RequestParam String email, @RequestParam("dateAdded") @DateTimeFormat(iso=DATE_TIME) LocalDateTime dateAdded) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
 com.fasterxml.jackson.core.JsonProcessingException
 - 
getById
 - 
updateArticles
 - 
deleteArticle
 
 -