WIP: Extract record view details from analytics/views api call
The details of recording a view are hidden away inside the api call.
These details should be in a class (or set of classes) within the code base and be subject to testing with the API left to do it's job of parameter parsing and error handling.
The motivation for this refactor is the ongoing boost improvements. A critical piece of boost functionality that marks a boost as expired has been hidden away inside this seemingly unrelated API call.
Closes #1077
added scoped labels
changed the description
added 1 commit
added 1 commit
- Developer
More regression...
2019/12/04 15:36:51 [error] 9#9: *65 FastCGI sent in stderr: "PHP message: Exception #1575473811: TypeError: Return value of Minds\Core\Analytics\Views\Record::recordEntity() must be of the type bool, none returned in /var/www/Minds/engine/Core/Analytics/Views/Record.php:144 Stack trace: #0 /var/www/Minds/engine/Controllers/api/v2/analytics/views.php(37): Minds\Core\Analytics\Views\Record->recordEntity() #1 /var/www/Minds/engine/Api/Factory.php(87): Minds\Controllers\api\v2\analytics\views->post(Array) #2 /var/www/Minds/engine/Controllers/api/api.php(81): Minds\Api\Factory::build(Array, Object(Zend\Diactoros\ServerRequest), Object(Zend\Diactoros\Response\JsonResponse)) #3 /var/www/Minds/engine/Core/Router.php(157): Minds\Controllers\api\api->post(Array) #4 /var/www/Minds/engine/index.php(9): Minds\Core\Router->route() #5 {main}" while reading response header from upstream, client: 192.168.13.110, server: _, request: "POST /api/v2/analytics/views/activity/1041704347395690512 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "extract-view-api-1077.minds.io", referrer: "https://extract-view-api-1077.minds.io/newsfeed/subscriptions"
- Developer
Also...
2019/12/04 15:37:08 [error] 9#9: *65 FastCGI sent in stderr: "PHP message: Attribute rejectReason is not defined in Minds\Core\Boost\Network\Boost (setRejectReason)" while reading response header from upstream, client: 192.168.13.110, server: _, request: "POST /api/v2/analytics/views/boost/1018217353512488976 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "extract-view-api-1077.minds.io", referrer: "https://extract-view-api-1077.minds.io/newsfeed/subscriptions"
Please register or sign in to reply