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.
23 lines
532 B
23 lines
532 B
import type { PagedResultDto } from '@abp/core';
|
|
|
|
import type { AuthorDto, GetAuthorPagedListInput } from '../types/authors';
|
|
|
|
import { useRequest } from '@abp/request';
|
|
|
|
export function useAuthorsApi() {
|
|
const { cancel, request } = useRequest();
|
|
|
|
function getPagedListApi(
|
|
input?: GetAuthorPagedListInput,
|
|
): Promise<PagedResultDto<AuthorDto>> {
|
|
return request<PagedResultDto<AuthorDto>>('/api/demo/authors', {
|
|
method: 'GET',
|
|
params: input,
|
|
});
|
|
}
|
|
|
|
return {
|
|
cancel,
|
|
getPagedListApi,
|
|
};
|
|
}
|
|
|