mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Add Direct Statics Controller
This commit is contained in:
parent
e8147c9482
commit
0e33d3f03f
36
app/Http/Controllers/StaticController.php
Normal file
36
app/Http/Controllers/StaticController.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
||||
*
|
||||
* @license https://www.elastic.co/licensing/elastic-license
|
||||
*/
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Http\Requests\Account\CreateAccountRequest;
|
||||
use App\Jobs\Account\CreateAccount;
|
||||
use App\Models\Account;
|
||||
use App\Models\CompanyUser;
|
||||
use App\Transformers\CompanyUserTransformer;
|
||||
use App\Utils\Statics;
|
||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class StaticController extends BaseController
|
||||
{
|
||||
|
||||
public function __invoke()
|
||||
{
|
||||
|
||||
$response = Statics::company(auth()->user()->getCompany()->getLocale());
|
||||
|
||||
return response()->json($response, 200, ['Content-type'=> 'application/json; charset=utf-8'], JSON_PRETTY_PRINT);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -116,9 +116,9 @@ class WebhookHandler implements ShouldQueue
|
||||
]);
|
||||
|
||||
SystemLogger::dispatch(
|
||||
$response,
|
||||
array_merge((array)$response,$data),
|
||||
SystemLog::CATEGORY_WEBHOOK,
|
||||
SystemLog::EVENT_WEBHOOK_RESPONSE,
|
||||
SystemLog::EVENT_WEBHOOK_SUCCESS,
|
||||
SystemLog::TYPE_WEBHOOK_RESPONSE,
|
||||
$this->company->clients->first(),
|
||||
$this->company
|
||||
|
@ -52,6 +52,7 @@ class SystemLog extends Model
|
||||
const EVENT_MAIL_DELIVERY = 34;
|
||||
|
||||
const EVENT_WEBHOOK_RESPONSE = 40;
|
||||
const EVENT_WEBHOOK_SUCCESS = 41;
|
||||
const EVENT_PDF_RESPONSE = 50;
|
||||
|
||||
const EVENT_AUTHENTICATION_FAILURE = 60;
|
||||
|
@ -197,6 +197,7 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a
|
||||
|
||||
Route::resource('subscriptions', 'SubscriptionController');
|
||||
Route::post('subscriptions/bulk', 'SubscriptionController@bulk')->name('subscriptions.bulk');
|
||||
Route::get('statics', 'StaticController');
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user