finally, queue logic

This commit is contained in:
2024-04-14 01:19:20 +03:00
parent d716a92dac
commit c64958bb9d
15 changed files with 177 additions and 17 deletions

View File

@ -29,6 +29,9 @@ export const QueueApi = createApi({
getQueues: builder.query({
query: () => "/",
}),
getQueueDetail: builder.query({
query: (queueId: string | undefined) => `/${queueId}`,
}),
createQueue: builder.mutation({
query: (data: CreateQueueRequest) => ({
url: "/",
@ -39,4 +42,8 @@ export const QueueApi = createApi({
}),
});
export const { useGetQueuesQuery, useCreateQueueMutation } = QueueApi;
export const {
useGetQueuesQuery,
useGetQueueDetailQuery,
useCreateQueueMutation,
} = QueueApi;