Skip to content

Commit

Permalink
fix: jsdoc types
Browse files Browse the repository at this point in the history
  • Loading branch information
navinkarkera committed Dec 11, 2023
1 parent 1b06e19 commit a4567ff
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/course-outline/data/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,12 @@ export async function restartIndexingOnCourse(reindexLink) {

/**
* Get course section
* @param {string} sectionId
* @param {string} itemId
* @returns {Promise<section>}
*/
export async function getCourseItem(sectionId) {
export async function getCourseItem(itemId) {
const { data } = await getAuthenticatedHttpClient()
.get(getXBlockApiUrl(sectionId));
.get(getXBlockApiUrl(itemId));
return camelCaseObject(data);
}

Expand Down Expand Up @@ -236,7 +236,7 @@ export async function configureCourseSection(sectionId, isVisibleToStaffOnly, st

/**
* Edit course section
* @param {string} sectionId
* @param {string} itemId
* @param {string} displayName
* @returns {Promise<Object>}
*/
Expand All @@ -253,7 +253,7 @@ export async function editItemDisplayName(itemId, displayName) {

/**
* Delete course section
* @param {string} sectionId
* @param {string} itemId
* @returns {Promise<Object>}
*/
export async function deleteCourseItem(itemId) {
Expand All @@ -265,8 +265,8 @@ export async function deleteCourseItem(itemId) {

/**
* Duplicate course section
* @param {string} sectionId
* @param {string} courseBlockId
* @param {string} itemId
* @param {string} parentId
* @returns {Promise<Object>}
*/
export async function duplicateCourseItem(itemId, parentId) {
Expand All @@ -281,7 +281,9 @@ export async function duplicateCourseItem(itemId, parentId) {

/**
* Add new course item like section, subsection or unit.
* @param {string} courseBlockId
* @param {string} parentLocator
* @param {string} category
* @param {string} displayName
* @returns {Promise<Object>}
*/
export async function addNewCourseItem(parentLocator, category, displayName) {
Expand Down

0 comments on commit a4567ff

Please sign in to comment.