mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: add response description interface
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { AsyncHandler } from '../../util/AsyncHandler';
|
||||
import { HttpResponse } from '../../server/HttpResponse';
|
||||
import { Operation } from '../operations/Operation';
|
||||
import { ResponseDescription } from '../operations/ResponseDescription';
|
||||
|
||||
/**
|
||||
* Writes to the HttpResponse.
|
||||
* Response depends on the operation result and potentially which errors was thrown.
|
||||
*/
|
||||
export type ResponseWriter = AsyncHandler<{ response: HttpResponse; operation: Operation; error?: Error }>;
|
||||
export abstract class ResponseWriter extends AsyncHandler<{ response: HttpResponse; description?: ResponseDescription; error?: Error }> {}
|
||||
|
||||
Reference in New Issue
Block a user