feat: Use asynchandler library for handlers

This commit is contained in:
Joachim Van Herwegen
2024-09-05 11:08:43 +02:00
parent dce39f67e8
commit 58574eec07
186 changed files with 944 additions and 1590 deletions

View File

@@ -1,5 +1,5 @@
import { AsyncHandler } from 'asynchronous-handlers';
import type { HttpRequest } from '../server/HttpRequest';
import { AsyncHandler } from '../util/handlers/AsyncHandler';
import type { Credentials } from './Credentials';
/**

View File

@@ -1,4 +1,4 @@
import { UnionHandler } from '../util/handlers/UnionHandler';
import { StatusUnionHandler } from '../util/handlers/StatusUnionHandler';
import type { Credentials } from './Credentials';
import type { CredentialsExtractor } from './CredentialsExtractor';
@@ -7,7 +7,7 @@ import type { CredentialsExtractor } from './CredentialsExtractor';
* If multiple of these extractors return a value for the same key,
* the last result will be used.
*/
export class UnionCredentialsExtractor extends UnionHandler<CredentialsExtractor> {
export class UnionCredentialsExtractor extends StatusUnionHandler<CredentialsExtractor> {
public constructor(extractors: CredentialsExtractor[]) {
super(extractors);
}