chore: update type

This commit is contained in:
Pranshu Chittora 2022-04-05 16:09:04 +05:30
parent eae53d9eff
commit 3b3fd2b3a9
No known key found for this signature in database
GPG Key ID: 3A9E57A016CC0626
2 changed files with 3 additions and 2 deletions

View File

@ -2,10 +2,10 @@ import axios from 'api';
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
import { IDiskType } from 'types/api/disks/getDisks';
import { PayloadProps } from 'types/api/disks/getDisks';
const getDisks = async (): Promise<
SuccessResponse<IDiskType[]> | ErrorResponse
SuccessResponse<PayloadProps> | ErrorResponse
> => {
try {
const response = await axios.get(`/disks`);

View File

@ -1,3 +1,4 @@
export type PayloadProps = IDiskType[];
export interface IDiskType {
name: string;
type: string;