feat: added filter options for learner posts (#340)
Co-authored-by: adeel.tajamul <adeel.tajamul@arbisoft.com>
This commit is contained in:
committed by
GitHub
parent
12dd08d97f
commit
7ced4b292c
@@ -45,11 +45,10 @@ export async function getUserProfiles(usernames) {
|
||||
* pagination: {count, num_pages, next, previous}
|
||||
* }
|
||||
*/
|
||||
export async function getUserPosts(courseId, { username, page, countFlagged }) {
|
||||
export async function getUserPosts(courseId, params) {
|
||||
const learnerPostsApiUrl = `${coursesApiUrl}${courseId}/learner/`;
|
||||
|
||||
const params = snakeCaseObject({ username, page, countFlagged });
|
||||
const snakeCaseParams = snakeCaseObject(params);
|
||||
const { data } = await getAuthenticatedHttpClient()
|
||||
.get(learnerPostsApiUrl, { params });
|
||||
.get(learnerPostsApiUrl, { params: snakeCaseParams });
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user