mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-21 21:09:22 +00:00
Add new information
This commit is contained in:
parent
78a612048d
commit
1b584ef360
@ -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 {
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user