-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a getDrivesList request and a createDrivesList in index.ts to get…
… the informations about the list of drives and create the corresponding new Drive instances with faked contents at thi stage.
- Loading branch information
1 parent
f25ec49
commit b6fd1fc
Showing
2 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { requestAPI } from './handler'; | ||
|
||
export interface IBucket { | ||
name: string; | ||
region: string; | ||
provider: string; | ||
creation_date: string; | ||
status: string; | ||
} | ||
|
||
export async function getDrivesList() { | ||
return await requestAPI<Array<IBucket>>('drives', { | ||
method: 'GET' | ||
}); | ||
} |