mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-26 00:42:53 -04:00 
			
		
		
		
	Add payment balance to client table
This commit is contained in:
		
							parent
							
								
									33f514f15b
								
							
						
					
					
						commit
						2d3816ece4
					
				| @ -93,7 +93,7 @@ class UpdateCompanyRequest extends Request | |||||||
|      * are saveable |      * are saveable | ||||||
|      * |      * | ||||||
|      * @param  object $settings |      * @param  object $settings | ||||||
|      * @return stdClass $settings |      * @return \stdClass $settings | ||||||
|      */ |      */ | ||||||
|     private function filterSaveableSettings($settings) |     private function filterSaveableSettings($settings) | ||||||
|     { |     { | ||||||
|  | |||||||
							
								
								
									
										19
									
								
								app/Models/License.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								app/Models/License.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | |||||||
|  | <?php | ||||||
|  | /** | ||||||
|  |  * Invoice Ninja (https://invoiceninja.com). | ||||||
|  |  * | ||||||
|  |  * @link https://github.com/invoiceninja/invoiceninja source repository | ||||||
|  |  * | ||||||
|  |  * @copyright Copyright (c) 2023. Invoice Ninja LLC (https://invoiceninja.com) | ||||||
|  |  * | ||||||
|  |  * @license https://www.elastic.co/licensing/elastic-license | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | namespace App\Models; | ||||||
|  | 
 | ||||||
|  | use Illuminate\Database\Eloquent\SoftDeletes; | ||||||
|  | 
 | ||||||
|  | class License extends StaticModel | ||||||
|  | { | ||||||
|  |     use SoftDeletes; | ||||||
|  | } | ||||||
| @ -24,7 +24,7 @@ class RouteServiceProvider extends ServiceProvider | |||||||
| { | { | ||||||
|     use MakesHash; |     use MakesHash; | ||||||
| 
 | 
 | ||||||
|     private int $default_rate_limit = 1000; |     private int $default_rate_limit = 5000; | ||||||
|     /** |     /** | ||||||
|      * Define your route model bindings, pattern filters, etc. |      * Define your route model bindings, pattern filters, etc. | ||||||
|      * |      * | ||||||
| @ -47,9 +47,9 @@ class RouteServiceProvider extends ServiceProvider | |||||||
| 
 | 
 | ||||||
|         RateLimiter::for('login', function () { |         RateLimiter::for('login', function () { | ||||||
| 
 | 
 | ||||||
|             if(Ninja::isSelfHost()) |             if (Ninja::isSelfHost()) { | ||||||
|                 return Limit::perMinute($this->default_rate_limit); |                 return Limit::none(); | ||||||
|             else { |             }else { | ||||||
|                 return Limit::perMinute(50); |                 return Limit::perMinute(50); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
| @ -57,9 +57,9 @@ class RouteServiceProvider extends ServiceProvider | |||||||
| 
 | 
 | ||||||
|         RateLimiter::for('api', function () { |         RateLimiter::for('api', function () { | ||||||
| 
 | 
 | ||||||
|             if(Ninja::isSelfHost()) |             if (Ninja::isSelfHost()) { | ||||||
|                 return Limit::perMinute($this->default_rate_limit); |                 return Limit::none(); | ||||||
|             else { |             }else { | ||||||
|                 return Limit::perMinute(300); |                 return Limit::perMinute(300); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
| @ -67,9 +67,9 @@ class RouteServiceProvider extends ServiceProvider | |||||||
| 
 | 
 | ||||||
|         RateLimiter::for('refresh', function () { |         RateLimiter::for('refresh', function () { | ||||||
| 
 | 
 | ||||||
|             if(Ninja::isSelfHost()) |             if (Ninja::isSelfHost()) { | ||||||
|                 return Limit::perMinute($this->default_rate_limit); |                 return Limit::none(); | ||||||
|             else { |             }else { | ||||||
|                 return Limit::perMinute(200); |                 return Limit::perMinute(200); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,6 +1,6 @@ | |||||||
| @php | @php | ||||||
|     $primary_color = isset($settings) ? $settings->primary_color : '#4caf50'; |     $primary_color = isset($settings) ? $settings->primary_color : '#4caf50'; | ||||||
|     $email_alignment = isset($settings) ? $settings->email_alignment : 'center'; |     $email_alignment = isset($settings) && $settings?->email_alignment ? $settings->email_alignment : 'center'; | ||||||
| @endphp | @endphp | ||||||
| 
 | 
 | ||||||
| <!DOCTYPE html | <!DOCTYPE html | ||||||
|  | |||||||
| @ -104,7 +104,7 @@ Route::group(['middleware' => ['throttle:api', 'api_secret_check']], function () | |||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
| Route::group(['middleware' => ['throttle:login','api_secret_check','email_db']], function () { | Route::group(['middleware' => ['throttle:login','api_secret_check','email_db']], function () { | ||||||
|     Route::post('api/v1/login', [LoginController::class, 'apiLogin'])->name('login.submit')->middleware('throttle:20,1'); |     Route::post('api/v1/login', [LoginController::class, 'apiLogin'])->name('login.submit'); | ||||||
|     Route::post('api/v1/reset_password', [ForgotPasswordController::class, 'sendResetLinkEmail']); |     Route::post('api/v1/reset_password', [ForgotPasswordController::class, 'sendResetLinkEmail']); | ||||||
| }); | }); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user