Conversation
| import java.util.List; | ||
|
|
||
| public class TransactionController extends BaseController{ | ||
|
|
| return null; | ||
| } | ||
|
|
||
| ResponseEntity<Void> updateEMIDefaults() throws ServiceException { |
There was a problem hiding this comment.
Make return type ResponseEntity<Boolean>
| return null; | ||
| } | ||
|
|
||
| ResponseEntity<Void> updateBorrowRequestStatus(@RequestBody Status status) throws ServiceException { |
There was a problem hiding this comment.
Make return type ResponseEntity<Boolean>
| return null; | ||
| } | ||
|
|
||
| ResponseEntity<Void> createBorrowRequest(@RequestBody BorrowRequest borrowRequest) throws ServiceException { |
There was a problem hiding this comment.
Make return type ResponseEntity<Boolean>
|
|
||
|
|
||
|
|
||
| ResponseEntity<List<User>> getAllUsers() throws ServiceException { |
There was a problem hiding this comment.
Throw controller exception
|
|
||
|
|
||
|
|
||
| ResponseEntity<List<User>> getAllUsers() throws ServiceException { |
There was a problem hiding this comment.
Add comments for administration purposes
| return null; | ||
| } | ||
|
|
||
| ResponseEntity<User> getUserById(String userId) throws ServiceException { |
There was a problem hiding this comment.
Rename to getUserForUserId
| import java.util.List; | ||
|
|
||
| public class BorrowRequestController extends BaseController{ | ||
| } No newline at end of file |
There was a problem hiding this comment.
Use proper annotations for Parameters and Request Body
| return null; | ||
| }; | ||
|
|
||
| ResponseEntity<List<Transaction>> getTransactionsBetween(@PathVariable String senderId, @PathVariable String receiverId) throws ControllerException |
There was a problem hiding this comment.
Rename this to a better name
| return null; | ||
| }; | ||
|
|
||
| ResponseEntity<List<Transaction>> getTransactionsByDate(@PathVariable LocalDate date) throws ControllerException |
There was a problem hiding this comment.
getTransactionsBetweenDate(start,end)
| return null; | ||
| } | ||
|
|
||
| ResponseEntity<Void> deleteUser(String userId) throws ServiceException { |
There was a problem hiding this comment.
Make return type ResponseEntity<Boolean>
| @RequestMapping("/user") | ||
| public class UserController extends BaseController{ | ||
| public class UserController { | ||
|
|
There was a problem hiding this comment.
Add Param and RequestBody Annotations
| return null; | ||
| } | ||
|
|
||
| ResponseEntity<Void> updateEMIDefaults() throws ServiceException { |
There was a problem hiding this comment.
Remove updateEMIdefaults and updateBorrowRequestStatus
| @RequestMapping("/borrow-request") | ||
| import java.util.List; | ||
|
|
||
| public class BorrowRequestController extends BaseController{ |
There was a problem hiding this comment.
Make the methods throw ControllerException, not ServiceException
| @RequestMapping("/user") | ||
| public class UserController extends BaseController{ | ||
| public class UserController { | ||
|
|
There was a problem hiding this comment.
Make the methods throw ControllerException, not ServiceException
| @RequestMapping("/user") | ||
| public class UserController extends BaseController{ | ||
| public class UserController { | ||
|
|
There was a problem hiding this comment.
Make this class extend BaseController
Created interfaces and controller signatures for BorrowRequest, Transaction and User