diff --git a/src/serverApi/v3/api.ts b/src/serverApi/v3/api.ts index c11606e3c8..87daf55d22 100644 --- a/src/serverApi/v3/api.ts +++ b/src/serverApi/v3/api.ts @@ -8953,7 +8953,7 @@ export const GroupApiAxiosParamCreator = function (configuration?: Configuration return { /** * - * @summary Get a list of classes and groups of type class for the current users school. + * @summary Get a list of classes and groups of type class for the current user. * @param {number} [skip] Number of elements (not pages) to be skipped * @param {number} [limit] Page limit, defaults to 10. * @param {'asc' | 'desc'} [sortOrder] @@ -8961,7 +8961,7 @@ export const GroupApiAxiosParamCreator = function (configuration?: Configuration * @param {*} [options] Override http request option. * @throws {RequiredError} */ - groupControllerFindClassesForSchool: async (skip?: number, limit?: number, sortOrder?: 'asc' | 'desc', sortBy?: 'name' | 'externalSourceName', options: any = {}): Promise => { + groupControllerFindClasses: async (skip?: number, limit?: number, sortOrder?: 'asc' | 'desc', sortBy?: 'name' | 'externalSourceName', options: any = {}): Promise => { const localVarPath = `/groups/class`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); @@ -9055,7 +9055,7 @@ export const GroupApiFp = function(configuration?: Configuration) { return { /** * - * @summary Get a list of classes and groups of type class for the current users school. + * @summary Get a list of classes and groups of type class for the current user. * @param {number} [skip] Number of elements (not pages) to be skipped * @param {number} [limit] Page limit, defaults to 10. * @param {'asc' | 'desc'} [sortOrder] @@ -9063,8 +9063,8 @@ export const GroupApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async groupControllerFindClassesForSchool(skip?: number, limit?: number, sortOrder?: 'asc' | 'desc', sortBy?: 'name' | 'externalSourceName', options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.groupControllerFindClassesForSchool(skip, limit, sortOrder, sortBy, options); + async groupControllerFindClasses(skip?: number, limit?: number, sortOrder?: 'asc' | 'desc', sortBy?: 'name' | 'externalSourceName', options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.groupControllerFindClasses(skip, limit, sortOrder, sortBy, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -9090,7 +9090,7 @@ export const GroupApiFactory = function (configuration?: Configuration, basePath return { /** * - * @summary Get a list of classes and groups of type class for the current users school. + * @summary Get a list of classes and groups of type class for the current user. * @param {number} [skip] Number of elements (not pages) to be skipped * @param {number} [limit] Page limit, defaults to 10. * @param {'asc' | 'desc'} [sortOrder] @@ -9098,8 +9098,8 @@ export const GroupApiFactory = function (configuration?: Configuration, basePath * @param {*} [options] Override http request option. * @throws {RequiredError} */ - groupControllerFindClassesForSchool(skip?: number, limit?: number, sortOrder?: 'asc' | 'desc', sortBy?: 'name' | 'externalSourceName', options?: any): AxiosPromise { - return localVarFp.groupControllerFindClassesForSchool(skip, limit, sortOrder, sortBy, options).then((request) => request(axios, basePath)); + groupControllerFindClasses(skip?: number, limit?: number, sortOrder?: 'asc' | 'desc', sortBy?: 'name' | 'externalSourceName', options?: any): AxiosPromise { + return localVarFp.groupControllerFindClasses(skip, limit, sortOrder, sortBy, options).then((request) => request(axios, basePath)); }, /** * @@ -9122,7 +9122,7 @@ export const GroupApiFactory = function (configuration?: Configuration, basePath export interface GroupApiInterface { /** * - * @summary Get a list of classes and groups of type class for the current users school. + * @summary Get a list of classes and groups of type class for the current user. * @param {number} [skip] Number of elements (not pages) to be skipped * @param {number} [limit] Page limit, defaults to 10. * @param {'asc' | 'desc'} [sortOrder] @@ -9131,7 +9131,7 @@ export interface GroupApiInterface { * @throws {RequiredError} * @memberof GroupApiInterface */ - groupControllerFindClassesForSchool(skip?: number, limit?: number, sortOrder?: 'asc' | 'desc', sortBy?: 'name' | 'externalSourceName', options?: any): AxiosPromise; + groupControllerFindClasses(skip?: number, limit?: number, sortOrder?: 'asc' | 'desc', sortBy?: 'name' | 'externalSourceName', options?: any): AxiosPromise; /** * @@ -9154,7 +9154,7 @@ export interface GroupApiInterface { export class GroupApi extends BaseAPI implements GroupApiInterface { /** * - * @summary Get a list of classes and groups of type class for the current users school. + * @summary Get a list of classes and groups of type class for the current user. * @param {number} [skip] Number of elements (not pages) to be skipped * @param {number} [limit] Page limit, defaults to 10. * @param {'asc' | 'desc'} [sortOrder] @@ -9163,8 +9163,8 @@ export class GroupApi extends BaseAPI implements GroupApiInterface { * @throws {RequiredError} * @memberof GroupApi */ - public groupControllerFindClassesForSchool(skip?: number, limit?: number, sortOrder?: 'asc' | 'desc', sortBy?: 'name' | 'externalSourceName', options?: any) { - return GroupApiFp(this.configuration).groupControllerFindClassesForSchool(skip, limit, sortOrder, sortBy, options).then((request) => request(this.axios, this.basePath)); + public groupControllerFindClasses(skip?: number, limit?: number, sortOrder?: 'asc' | 'desc', sortBy?: 'name' | 'externalSourceName', options?: any) { + return GroupApiFp(this.configuration).groupControllerFindClasses(skip, limit, sortOrder, sortBy, options).then((request) => request(this.axios, this.basePath)); } /** diff --git a/src/store/group.ts b/src/store/group.ts index d27dc28750..d3c1e49f91 100644 --- a/src/store/group.ts +++ b/src/store/group.ts @@ -137,7 +137,7 @@ export default class GroupModule extends VuexModule { : undefined; const response: AxiosResponse = - await this.groupApi.groupControllerFindClassesForSchool( + await this.groupApi.groupControllerFindClasses( this.pagination.skip, this.pagination.limit, this.getSortOrder, diff --git a/src/store/group.unit.ts b/src/store/group.unit.ts index 3c92c477b0..64263609e2 100644 --- a/src/store/group.unit.ts +++ b/src/store/group.unit.ts @@ -199,7 +199,7 @@ describe("GroupModule", () => { limit: pagination.limit, }); - apiMock.groupControllerFindClassesForSchool.mockResolvedValue( + apiMock.groupControllerFindClasses.mockResolvedValue( mockApiResponse({ data: response }) ); @@ -217,9 +217,7 @@ describe("GroupModule", () => { await module.loadClassesForSchool(); - expect( - apiMock.groupControllerFindClassesForSchool - ).toHaveBeenCalledWith( + expect(apiMock.groupControllerFindClasses).toHaveBeenCalledWith( pagination.skip, pagination.limit, sortOrder, @@ -242,7 +240,7 @@ describe("GroupModule", () => { const error = axiosErrorFactory.build(); const apiError = mapAxiosErrorToResponseError(error); - apiMock.groupControllerFindClassesForSchool.mockRejectedValue(error); + apiMock.groupControllerFindClasses.mockRejectedValue(error); return { apiError, @@ -288,7 +286,7 @@ describe("GroupModule", () => { await module.deleteClass(class1.id); - expect(apiMock.groupControllerFindClassesForSchool).toHaveBeenCalled(); + expect(apiMock.groupControllerFindClasses).toHaveBeenCalled(); }); });