summaryrefslogtreecommitdiff
path: root/src/api/productApi.js
blob: feb9125707cb41044ed40de1fdbc45c200037909 (plain)
1
2
3
4
5
6
7
8
9
10
import axios from 'axios'

export const popularProductApi = () => {
  return async () => {
    const dataPopularProducts = await axios(
      `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/search?q=*&page=1&orderBy=popular-weekly`
    )
    return dataPopularProducts.data.response
  }
}