Commit 5c8eb0c1 by Arjun Jhukal

minor change

parent 4061d91a
......@@ -96,10 +96,7 @@ export const playerApi = createApi({
url: `/api/admin/user/suspend/${id}`,
method: "POST",
}),
invalidatesTags: (result, error, { id }) => [
{ type: "Players", id },
{ type: "Players", id: "LIST" },
],
invalidatesTags: (result, error, { id }) => [{ type: "Players", id }],
}),
}),
});
......
......@@ -6,7 +6,7 @@ import { QueryParams } from "@/types/config";
export const transactionApi = createApi({
reducerPath: "transactionApi",
baseQuery: baseQuery,
tagTypes: ["deposit", "withdrawl"],
tagTypes: ["Deposit", "Withdrawl"],
endpoints: (builder) => ({
deposit: builder.mutation<DepositResponseProps, DepositProps>({
query: ({ id, amount, type = "crypto" }) => ({
......@@ -14,7 +14,7 @@ export const transactionApi = createApi({
method: "POST",
body: { amount: amount, type: type }
}),
invalidatesTags: ["deposit"]
invalidatesTags: ["Deposit"]
}),
getAllDeposit: builder.query<DepositListProps, QueryParams>({
query: ({ search, page, per_page }) => {
......@@ -28,7 +28,7 @@ export const transactionApi = createApi({
method: "GET"
}
},
providesTags: ['deposit']
providesTags: ['Deposit']
}),
withdrawl: builder.mutation<DepositResponseProps, any>({
query: (body) => ({
......@@ -36,7 +36,7 @@ export const transactionApi = createApi({
method: "POST",
body: body
}),
invalidatesTags: ["withdrawl"]
invalidatesTags: ["Withdrawl"]
}),
getAllWithdrawl: builder.query<DepositListProps, QueryParams>({
query: ({ search, page, per_page }) => {
......@@ -50,7 +50,7 @@ export const transactionApi = createApi({
method: "GET"
}
},
providesTags: ["withdrawl"]
providesTags: ["Withdrawl"]
}),
getAllTransaction: builder.query<DepositListProps, QueryParams & { user_id?: string | number; game_id?: string | number }>({
query: ({ search, page, per_page, user_id, game_id }) => {
......@@ -66,7 +66,7 @@ export const transactionApi = createApi({
method: "GET"
}
},
providesTags: ["withdrawl", "deposit"]
providesTags: ["Withdrawl", "Deposit"]
}),
})
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment