mirror of
				https://gitlab.com/comunic/comunicapiv2
				synced 2025-10-31 09:34:44 +00:00 
			
		
		
		
	Add new information
This commit is contained in:
		| @@ -13,6 +13,24 @@ export enum Action { | ||||
| 	CREATE_ACCOUNT = "create_account" | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * The duration entries will be kept in the table | ||||
|  */ | ||||
| const MAX_TIME = 3600; // 1 hour | ||||
|  | ||||
| /** | ||||
|  * Information about a specific IP & action | ||||
|  */ | ||||
| interface CountInfo { | ||||
| 	action: Action, | ||||
| 	ip: string, | ||||
| 	time: number, // Begin time | ||||
| 	count: number, | ||||
| } | ||||
|  | ||||
| // The list of limits | ||||
| const list : Array<CountInfo> = []; | ||||
|  | ||||
| export class APILimitHelper { | ||||
|  | ||||
| 	/** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user