diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-28 10:51:17 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-04-28 10:51:17 +0700 |
| commit | 22afd4cf502a4dbd7bf68308cd92443545336645 (patch) | |
| tree | 3287ec808d0610029d36c2e02c450b4dd5a7cafa /src/core/api | |
| parent | 8b42783cd838b1da78d3d192860861ada5d13514 (diff) | |
search spell when not found
Diffstat (limited to 'src/core/api')
| -rw-r--r-- | src/core/api/searchSpellApi.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/api/searchSpellApi.js b/src/core/api/searchSpellApi.js new file mode 100644 index 00000000..4794c3e1 --- /dev/null +++ b/src/core/api/searchSpellApi.js @@ -0,0 +1,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 |
