mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-07-20 17:53:01 +08:00
15 lines
448 B
TypeScript
15 lines
448 B
TypeScript
import { createApi } from '@reduxjs/toolkit/query/react';
|
|
import baseQueryWithAuth from '../auth/authQuery';
|
|
|
|
export const targetNameApi = createApi({
|
|
reducerPath: 'targetName',
|
|
baseQuery: baseQueryWithAuth,
|
|
endpoints: (builder) => ({
|
|
getTargetName: builder.query<{targetName: string}, {target: string; platformName: string}>({
|
|
query: () => '/target_name',
|
|
}),
|
|
}),
|
|
});
|
|
|
|
export const { useGetTargetNameQuery } = targetNameApi;
|