mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01:00
Merge pull request #6322 from turbo124/v5-develop
Change default row_format from compressed to dynamic
This commit is contained in:
commit
59549e02e9
@ -34,7 +34,7 @@ class StoreCompanyGatewayRequest extends Request
|
||||
public function rules()
|
||||
{
|
||||
$rules = [
|
||||
'gateway_key' => 'required',
|
||||
'gateway_key' => 'required|alpha_num',
|
||||
'fees_and_limits' => new ValidCompanyGatewayFeesAndLimitsRule(),
|
||||
];
|
||||
|
||||
@ -45,9 +45,8 @@ class StoreCompanyGatewayRequest extends Request
|
||||
{
|
||||
$input = $this->all();
|
||||
|
||||
$gateway = Gateway::where('key', $input['gateway_key'])->first();
|
||||
|
||||
if($gateway);
|
||||
if($gateway = Gateway::where('key', $input['gateway_key'])->first())
|
||||
{
|
||||
|
||||
$default_gateway_fields = json_decode($gateway->fields);
|
||||
|
@ -112,6 +112,10 @@ class NinjaMailerJob implements ShouldQueue
|
||||
|
||||
} catch (\Exception $e) {
|
||||
|
||||
// if($e instanceof GuzzleHttp\Exception\ClientException){
|
||||
|
||||
// }
|
||||
|
||||
nlog("error failed with {$e->getMessage()}");
|
||||
|
||||
if($this->nmo->entity)
|
||||
|
@ -107,7 +107,10 @@ class TemplateEmail extends Mailable
|
||||
$message->invitation = $this->invitation;
|
||||
});
|
||||
|
||||
//hosted | plan check here
|
||||
/*TODO insert another check here for whether the attachment exists */
|
||||
nlog($this->build_email->getAttachments());
|
||||
|
||||
|
||||
foreach ($this->build_email->getAttachments() as $file) {
|
||||
|
||||
if(is_string($file))
|
||||
|
@ -46,7 +46,7 @@ return [
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => env('DB_STRICT', false),
|
||||
// 'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
|
||||
// 'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
|
||||
],
|
||||
|
||||
'sqlite' => [
|
||||
@ -93,7 +93,7 @@ return [
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => env('DB_STRICT', false),
|
||||
'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
|
||||
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
|
||||
// 'options' => array(
|
||||
// PDO::ATTR_EMULATE_PREPARES => true
|
||||
// ),
|
||||
@ -111,7 +111,7 @@ return [
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => env('DB_STRICT', false),
|
||||
'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
|
||||
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
|
||||
// 'options' => array(
|
||||
// PDO::ATTR_EMULATE_PREPARES => true
|
||||
// ),
|
||||
@ -129,7 +129,7 @@ return [
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => env('DB_STRICT', false),
|
||||
'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
|
||||
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
|
||||
// 'options' => array(
|
||||
// PDO::ATTR_EMULATE_PREPARES => true
|
||||
// ),
|
||||
@ -147,7 +147,7 @@ return [
|
||||
'prefix' => '',
|
||||
'prefix_indexes' => true,
|
||||
'strict' => env('DB_STRICT', false),
|
||||
'engine' => 'InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8',
|
||||
'engine' => 'InnoDB ROW_FORMAT=DYNAMIC',
|
||||
// 'options' => array(
|
||||
// PDO::ATTR_EMULATE_PREPARES => true
|
||||
// ),
|
||||
|
@ -45,6 +45,43 @@ class CompanyGatewayApiTest extends TestCase
|
||||
Model::reguard();
|
||||
}
|
||||
|
||||
public function testCompanyGatewayEndPointsWithIncorrectFields()
|
||||
{
|
||||
$data = [
|
||||
'config' => 'random config',
|
||||
'gateway_key' => '',
|
||||
];
|
||||
|
||||
/* POST */
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->post('/api/v1/company_gateways', $data);
|
||||
|
||||
$response->assertStatus(302);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function testCompanyGatewayEndPointsWithInvalidFields()
|
||||
{
|
||||
$data = [
|
||||
'config' => 'random config',
|
||||
'gateway_key' => '$#%^&*(',
|
||||
];
|
||||
|
||||
/* POST */
|
||||
$response = $this->withHeaders([
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->token,
|
||||
])->post('/api/v1/company_gateways', $data);
|
||||
|
||||
$response->assertStatus(302);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function testCompanyGatewayEndPoints()
|
||||
{
|
||||
$data = [
|
||||
|
Loading…
Reference in New Issue
Block a user