You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
2.9 KiB

5 months ago
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
5 months ago
import type { BaseResponse_List_CourseResources_ } from '../models/BaseResponse_List_CourseResources_';
import type { BaseResponse_Page_ } from '../models/BaseResponse_Page_';
import type { BaseResponse_string_ } from '../models/BaseResponse_string_';
import type { CourseResources } from '../models/CourseResources';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
5 months ago
export class CourseResourceControllerService {
5 months ago
/**
* All
* @returns BaseResponse_List_CourseResources_ OK
* @throws ApiError
*/
public static allUsingGet1(): CancelablePromise<BaseResponse_List_CourseResources_> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/courses/all',
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* deleteRecords
* @param ids ids
* @returns BaseResponse_string_ OK
* @throws ApiError
*/
public static deleteRecordsUsingDelete1(
ids: Array<number>,
): CancelablePromise<BaseResponse_string_> {
return __request(OpenAPI, {
method: 'DELETE',
url: '/api/courses/delete',
query: {
'ids': ids,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
},
});
}
/**
* getAll
* @param pagenum pagenum
* @param pagesize pagesize
* @param type type
* @returns BaseResponse_Page_ OK
* @throws ApiError
*/
public static getAllUsingGet1(
pagenum: number = 1,
pagesize: number = 10,
type?: string,
): CancelablePromise<BaseResponse_Page_> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/courses/getall',
query: {
'pagenum': pagenum,
'pagesize': pagesize,
'type': type,
},
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
/**
* saveCourseResource
* @param courseResources courseResources
* @returns BaseResponse_string_ OK
* @throws ApiError
*/
public static saveCourseResourceUsingGet1(
courseResources: CourseResources,
): CancelablePromise<BaseResponse_string_> {
return __request(OpenAPI, {
5 months ago
method: 'POST',
5 months ago
url: '/api/courses/save',
body: courseResources,
errors: {
401: `Unauthorized`,
403: `Forbidden`,
404: `Not Found`,
},
});
}
5 months ago
}