upda/server/web/src/api/infoApi.ts

17 lines
384 B
TypeScript
Raw Normal View History

import { injectEndpoints } from './index';
import ApiTags from '../constants/apiTags';
import { InfoResponse } from '../types';
export const infoApi = injectEndpoints({
endpoints: (build) => {
return {
getInfo: build.query<InfoResponse, void>({
query: () => ({ url: 'info' }),
providesTags: [ApiTags.Info]
})
};
}
});
export const { useGetInfoQuery } = infoApi;