diff --git a/src/helpers/APILimitsHelper.ts b/src/helpers/APILimitsHelper.ts index 5ea28bd..1226f5d 100644 --- a/src/helpers/APILimitsHelper.ts +++ b/src/helpers/APILimitsHelper.ts @@ -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 = []; + export class APILimitHelper { /**