feature/sidebar #8
@@ -1,37 +1,4 @@
|
|||||||
/**
|
export interface ApiResponse<T> {
|
||||||
* 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<T> {
|
|
||||||
/**
|
|
||||||
* Data
|
|
||||||
*/
|
|
||||||
data: T;
|
data: T;
|
||||||
/**
|
|
||||||
* Status
|
|
||||||
*/
|
|
||||||
status: number;
|
status: number;
|
||||||
/**
|
|
||||||
* Status text
|
|
||||||
*/
|
|
||||||
statusText: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ApiResponse<T> = ApiErrorResponse | ApiSuccessResponse<T>;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user