mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Fix routes
This commit is contained in:
@@ -42,6 +42,7 @@ class NetWorthController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
$this->repository = app(AccountRepositoryInterface::class);
|
||||
@@ -52,13 +53,17 @@ class NetWorthController extends Controller
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param SingleDateRequest $request
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function get(SingleDateRequest $request): JsonResponse
|
||||
{
|
||||
$date = $request->getDate();
|
||||
$result = $this->netWorth->sumNetWorthByCurrency($date);
|
||||
$converted = $this->cerSum($result);
|
||||
|
||||
return response()->json($converted);
|
||||
return response()->api($converted);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user