banner view updated

This commit is contained in:
2024-05-08 20:38:32 +05:30
parent cd52075693
commit 640a72d02a
14 changed files with 392 additions and 263 deletions

View File

@@ -149,11 +149,15 @@ export const rubixApi = createApi({
// ===============[ Learn Banners endpoints ]=======================
// ===============[ Build Banners endpoints ]=======================
getBuildBanner: builder.query({
query: () => "/admin/build",
providesTags: ["getBuildBanner"],
}),
getBuildBannerById: builder.query({
query: (id) => `/admin/build/${id}`,
providesTags: ["getBuildBannerById"],
}),
@@ -162,6 +166,10 @@ export const rubixApi = createApi({
query: () => "/admin/main-news",
providesTags: ["getNewsBanner"],
}),
getNewsBannerById: builder.query({
query: (id) => `/admin/main-news/${id}`,
providesTags: ["getNewsBannerById"],
}),
// ================[ blog endpoints ]====================
@@ -271,6 +279,13 @@ export const rubixApi = createApi({
}),
invalidatesTags: ["getEvents"],
}),
deleteEvents: builder.mutation({
query: (blogId) => ({
url: `/admin/events/${blogId}`,
method: "DELETE",
}),
invalidatesTags: ["getEvents"],
}),
@@ -301,8 +316,10 @@ export const {
useUpdateLearnBannerStatusMutation,
useGetBuildBannerQuery,
useGetBuildBannerByIdQuery,
useGetNewsBannerQuery,
useGetNewsBannerByIdQuery,
useGetBlogQuery,
useGetBlogByIdQuery,
@@ -324,4 +341,5 @@ export const {
useGetEventsQuery,
useCreateEventsMutation,
useUpdateEventsStatusMutation,
useDeleteEventsMutation,
} = rubixApi;