upda/server/web/src/api/infoApi.ts
Varakh d0312a5853
All checks were successful
/ build (push) Successful in 5m30s
feat(embedded_ui): fully integrate UI into GoLang binary (#43)
Reviewed-on: #43
Co-authored-by: Varakh <varakh@varakh.de>
Co-committed-by: Varakh <varakh@varakh.de>
2024-10-25 14:12:35 +00:00

16 lines
384 B
TypeScript

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;