import apiSlice from './api'

export const commonApiSlice = apiSlice.injectEndpoints({
  endpoints: builder => ({
    getUploadToken: builder.query({
      query: () => ({
        url: `/api/upload/getToken`,
        method: 'GET',
      }),
    }),
  }),
})

export const { useGetUploadTokenQuery, useLazyGetUploadTokenQuery } = commonApiSlice
