-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fetch webinars from admin panel (#74)
* prepare basic functions to fetch webinars * types from EscolaLms for webinars * fix type for cart item Co-authored-by: Mateusz Motyka <mati@mateuszs-mini.home>
- Loading branch information
Showing
5 changed files
with
71 additions
and
5 deletions.
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
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,19 @@ | ||
import request from 'umi-request'; | ||
import * as API from '../types/api'; | ||
|
||
/** GET /api/webinars */ | ||
export async function webinars(params: API.WebinarParams, options?: { [key: string]: any }) { | ||
return request<API.WebinarsList>(`/api/webinars`, { | ||
method: 'GET', | ||
params, | ||
...(options || {}), | ||
}); | ||
} | ||
|
||
/** GET /api/webinars/:id */ | ||
export async function getWebinar(id: number, options?: { [key: string]: any }) { | ||
return request<API.DefaultResponse<API.Webinar>>(`/api/webinars/${id}`, { | ||
method: 'GET', | ||
...(options || {}), | ||
}); | ||
} |
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