feat: add quotas (#4779)

adds possibilities to cap authenticated requests and execution seconds of actions on a defined intervall
This commit is contained in:
Elio Bischof
2023-02-15 02:52:11 +01:00
committed by GitHub
parent 45f6a4436e
commit 681541f41b
117 changed files with 4652 additions and 510 deletions

View File

@@ -1,18 +1,18 @@
import { requestHeaders } from './apiauth';
import { API, Entity, SearchResult } from './types';
import { API, Entity, SearchResult, Token } from './types';
export function searchSomething(
api: API,
token: Token,
searchPath: string,
method: string,
mapResult: (body: any) => SearchResult,
orgId?: number,
orgId?: string,
): Cypress.Chainable<SearchResult> {
return cy
.request({
method: method,
url: searchPath,
headers: requestHeaders(api, orgId),
headers: requestHeaders(token, orgId),
failOnStatusCode: method == 'POST',
})
.then((res) => {