Commit 5c8eb0c1 by Arjun Jhukal

minor change

parent 4061d91a
...@@ -96,10 +96,7 @@ export const playerApi = createApi({ ...@@ -96,10 +96,7 @@ export const playerApi = createApi({
url: `/api/admin/user/suspend/${id}`, url: `/api/admin/user/suspend/${id}`,
method: "POST", method: "POST",
}), }),
invalidatesTags: (result, error, { id }) => [ invalidatesTags: (result, error, { id }) => [{ type: "Players", id }],
{ type: "Players", id },
{ type: "Players", id: "LIST" },
],
}), }),
}), }),
}); });
......
...@@ -6,7 +6,7 @@ import { QueryParams } from "@/types/config"; ...@@ -6,7 +6,7 @@ import { QueryParams } from "@/types/config";
export const transactionApi = createApi({ export const transactionApi = createApi({
reducerPath: "transactionApi", reducerPath: "transactionApi",
baseQuery: baseQuery, baseQuery: baseQuery,
tagTypes: ["deposit", "withdrawl"], tagTypes: ["Deposit", "Withdrawl"],
endpoints: (builder) => ({ endpoints: (builder) => ({
deposit: builder.mutation<DepositResponseProps, DepositProps>({ deposit: builder.mutation<DepositResponseProps, DepositProps>({
query: ({ id, amount, type = "crypto" }) => ({ query: ({ id, amount, type = "crypto" }) => ({
...@@ -14,7 +14,7 @@ export const transactionApi = createApi({ ...@@ -14,7 +14,7 @@ export const transactionApi = createApi({
method: "POST", method: "POST",
body: { amount: amount, type: type } body: { amount: amount, type: type }
}), }),
invalidatesTags: ["deposit"] invalidatesTags: ["Deposit"]
}), }),
getAllDeposit: builder.query<DepositListProps, QueryParams>({ getAllDeposit: builder.query<DepositListProps, QueryParams>({
query: ({ search, page, per_page }) => { query: ({ search, page, per_page }) => {
...@@ -28,7 +28,7 @@ export const transactionApi = createApi({ ...@@ -28,7 +28,7 @@ export const transactionApi = createApi({
method: "GET" method: "GET"
} }
}, },
providesTags: ['deposit'] providesTags: ['Deposit']
}), }),
withdrawl: builder.mutation<DepositResponseProps, any>({ withdrawl: builder.mutation<DepositResponseProps, any>({
query: (body) => ({ query: (body) => ({
...@@ -36,7 +36,7 @@ export const transactionApi = createApi({ ...@@ -36,7 +36,7 @@ export const transactionApi = createApi({
method: "POST", method: "POST",
body: body body: body
}), }),
invalidatesTags: ["withdrawl"] invalidatesTags: ["Withdrawl"]
}), }),
getAllWithdrawl: builder.query<DepositListProps, QueryParams>({ getAllWithdrawl: builder.query<DepositListProps, QueryParams>({
query: ({ search, page, per_page }) => { query: ({ search, page, per_page }) => {
...@@ -50,7 +50,7 @@ export const transactionApi = createApi({ ...@@ -50,7 +50,7 @@ export const transactionApi = createApi({
method: "GET" method: "GET"
} }
}, },
providesTags: ["withdrawl"] providesTags: ["Withdrawl"]
}), }),
getAllTransaction: builder.query<DepositListProps, QueryParams & { user_id?: string | number; game_id?: string | number }>({ getAllTransaction: builder.query<DepositListProps, QueryParams & { user_id?: string | number; game_id?: string | number }>({
query: ({ search, page, per_page, user_id, game_id }) => { query: ({ search, page, per_page, user_id, game_id }) => {
...@@ -66,7 +66,7 @@ export const transactionApi = createApi({ ...@@ -66,7 +66,7 @@ export const transactionApi = createApi({
method: "GET" 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