Commit Graph

107 Commits

Author SHA1 Message Date
Julius Härtl
5639bd1274 Fix controller deleted at parameter
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-15 21:15:23 +02:00
Julius Härtl
babfcbddd8 Fix imports
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-15 21:15:23 +02:00
Ryan Fletcher
37a2858d5f wrote attachment api controller, fixed bug caught by unit test in CardService
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:22 +02:00
Ryan Fletcher
e88c9a760d Wrote unit tests for AttachmentApiController and stubbed out AttachmentApicontroller. Trying out test driven development.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:21 +02:00
Ryan Fletcher
172a80fa5d Added additional endpoints for cards / stacks
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:21 +02:00
Ryan Fletcher
3e965d0cfb Implemented additional CardApiController endpoints
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:21 +02:00
Ryan Fletcher
507a7fd243 Code cleanup, removing unused code from older iteration.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:21 +02:00
Ryan Fletcher
184cd00a8b Wrote initial unit tests for LabelApiControllerTest.php
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:21 +02:00
Ryan Fletcher
9c81584b02 Wrote tests for CardApiControllerTest.php
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:20 +02:00
Ryan Fletcher
5bc8a363b9 Split Card Update in CardApiController as it was gigantic and broke codacy complexity rules by a lot. Also moved validation checks into respective services.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:20 +02:00
Ryan Fletcher
f2268c7f58 Moved Data Response checks into stack serivice, cleaned up related unit tests.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:20 +02:00
Ryan Fletcher
d33dd3e0fc Moved BadRequestException checks to middleware, removed uneeded unit tests in BoardApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:20 +02:00
Ryan Fletcher
8cac183af6 simple code style changes according to codacy standards.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:20 +02:00
Ryan Fletcher
570ac81848 added the create tests in StackApiControllerTest
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:19 +02:00
Ryan Fletcher
5719e9f134 Wrote unit tests against StackApiController -> get()
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:19 +02:00
Ryan Fletcher
891fa7b7d5 Created index tests for StackApiTestController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:19 +02:00
Ryan Fletcher
54f110f7c6 first attempt at BoardApiControllerTest->testGetNoPermission()
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:19 +02:00
Ryan Fletcher
6d57b1081a BoardApiControllerTest wrote delete tests
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:18 +02:00
Ryan Fletcher
8dd732631a BoardApiController wrote update tests
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:18 +02:00
Ryan Fletcher
1fe70568cb Wrote unit tests for the BoardApiController -> create tests
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:18 +02:00
Ryan Fletcher
bd254fd261 BoardApiControllerTest wrote get() tests.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:18 +02:00
Ryan Fletcher
cfd9ab98c6 Implemented StackApiController Get Function.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:17 +02:00
Ryan Fletcher
dd1d4246fe Finished Error handling across the API
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:17 +02:00
Ryan Fletcher
2668f6b80c committing WIP (improving error validation across the api's)
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:17 +02:00
Ryan Fletcher
a388d199dc Refactored error handling in StackApiController and moved it into ApiHelper.php, this will allow me to use the same checks in all controllers.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:16 +02:00
Ryan Fletcher
d9f3d492dc Better variable name for stackService in StackApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:16 +02:00
Ryan Fletcher
a14ca3d1f5 Better error handling in StackApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:16 +02:00
Ryan Fletcher
7d9fc83dc9 Code style fixings.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:16 +02:00
Ryan Fletcher
f97c7c3f7b Added in Create + Delete functions to the LabelApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:16 +02:00
Ryan Fletcher
6002067b64 Created LabelApiController and it's get / update methods.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:16 +02:00
Ryan Fletcher
7e4d24236a Updated the CardApiController->update method to allow updating of archive state and assigned user,.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:15 +02:00
Ryan Fletcher
b82591a0bc Added delete operation to CardApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:15 +02:00
Ryan Fletcher
e5f7f89ed9 Wrote update method for CardApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:15 +02:00
Ryan Fletcher
a68e888654 Started CardApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:15 +02:00
Ryan Fletcher
ced87edfa5 Put in validation responses in BoardApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:15 +02:00
Ryan Fletcher
5415ec21dc Validation Checking against StackApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:14 +02:00
Ryan Fletcher
3cb496daa2 Cleaned up StackApiController to use proper route parameters, removed route parameters from request payloads as per rest standards.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:14 +02:00
Ryan Fletcher
03e0559afe StackApiController->delete($boardId, $id) added in error handling
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:14 +02:00
Ryan Fletcher
be91ff641c StackApiController added the update put route.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:14 +02:00
Ryan Fletcher
cec06493c0 Error handling for StackApiController->Index()
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:14 +02:00
Ryan Fletcher
0da84a3e8c Corrected comment in BoardApiController from copy / paste.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:14 +02:00
Ryan Fletcher
6822d7d099 Error handling in undelete function and created the update function in BoardApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:13 +02:00
Ryan Fletcher
d82746be97 Error handling for undoDelete and created an update method in BoardApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:13 +02:00
Ryan Fletcher
3b49c7f262 Added exception handling to BoardApiController -> Delete
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:13 +02:00
Ryan Fletcher
9bc9569a0d Added checks to see if the entity is not found in BoardApiController -> get($id)
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:13 +02:00
Ryan Fletcher
8771e35f11 Added exception handling to StackApiController->create()
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:13 +02:00
Ryan Fletcher
656e8efa43 quick test in StackApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:13 +02:00
Julius Härtl
9fc01eb51f Move DI of IUserManager, IGroupManager, userId to the BoardService
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-15 21:15:12 +02:00
Steven R. Baker
e32adb17f2 Don't need to pass around the userInfo with it encapsulated in BoardService.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-15 21:15:12 +02:00
Steven R. Baker
1ffa3211ba Extract getBoardPererequisites() so it can be re-used.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-15 21:15:11 +02:00