mirror of
https://github.com/grocy/grocy.git
synced 2025-08-13 01:06:23 +00:00
Also log missing localization found in frontend (only when MODE == dev)
This commit is contained in:
@@ -20,4 +20,22 @@ class SystemApiController extends BaseApiController
|
||||
'changed_time' => $this->DatabaseService->GetDbChangedTime()
|
||||
));
|
||||
}
|
||||
|
||||
public function LogMissingLocalization(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
||||
{
|
||||
if (GROCY_MODE === 'dev')
|
||||
{
|
||||
try
|
||||
{
|
||||
$requestBody = $request->getParsedBody();
|
||||
|
||||
$this->LocalizationService->LogMissingLocalization(GROCY_CULTURE, $requestBody['text']);
|
||||
return $this->ApiResponse(array('success' => true));
|
||||
}
|
||||
catch (\Exception $ex)
|
||||
{
|
||||
return $this->VoidApiActionResponse($response, false, 400, $ex->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user