Commit Graph

1193 Commits

Author SHA1 Message Date
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
Julius Härtl
dcfb9f3903 Properly annotate exceptions thrown by services
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-15 21:15:19 +02:00
Julius Härtl
2482dc963a Fix BoardServiceTest
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-15 21:15:18 +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
fad579c4d3 Wrote first unit test for BoardApiController
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:18 +02:00
Ryan Fletcher
e8c53d71aa fixed more unit tests.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:17 +02:00
Ryan Fletcher
e0049cf07b Resolved unit tests errors, down from 36 to 9.
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:17 +02:00
Ryan Fletcher
881b05aeb1 fixed BoardControllerTest from errors
Signed-off-by: Ryan Fletcher <ryan.fletcher@codepassion.ca>
2018-08-15 21:15:17 +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
0c0910ee81 Co authored for my changes.
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
Steven R. Baker
41cf623bb8 This should be 200 on deletion, so we can tell whether a deletion succeeds or not.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-15 21:15:10 +02:00
Steven R. Baker
8ec97032b1 Re-format code according to the coding style.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-15 21:15:08 +02:00
Steven R. Baker
40f34eb3bc Fix the routing and the stacks API endpoint.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-15 21:15:07 +02:00
Steven R. Baker
a4b348488b Add Stack support to API.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-15 21:15:05 +02:00
Steven R. Baker
8316a0b25f Board creation via API.
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-15 21:15:04 +02:00