summaryrefslogtreecommitdiff
path: root/src/core/api/searchSpellApi.js
blob: 4794c3e151e0f2821409fa5acaa57df9eddff640 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import axios from 'axios'

const searchSpellApi = async ({ query }) => {
  const dataSearchSpell = await axios(
    `${process.env.NEXT_PUBLIC_SELF_HOST}/api/shop/spell?q=${query.trim()}`
  )
  return dataSearchSpell
}

searchSpellApi.defaultProps = {
  query: ''
}

export default searchSpellApi