diff --git a/src/shared/types/common.ts b/src/shared/types/common.ts index 2c1f8c8..8bcc1b7 100644 --- a/src/shared/types/common.ts +++ b/src/shared/types/common.ts @@ -1,37 +1,4 @@ -/** - * Model of response with error - */ -export interface ApiErrorResponse { - /** - * Error text - */ - error: string; - /** - * Status - */ - status: number; - /** - * Status text - */ - statusText: string; -} - -/** - * Model of response with success - */ -export interface ApiSuccessResponse { - /** - * Data - */ +export interface ApiResponse { data: T; - /** - * Status - */ status: number; - /** - * Status text - */ - statusText: string; } - -export type ApiResponse = ApiErrorResponse | ApiSuccessResponse;