mirror of
https://github.com/aelve/guide.git
synced 2024-12-23 21:02:13 +03:00
16 lines
315 B
TypeScript
16 lines
315 B
TypeScript
import axios from 'axios'
|
|
class WikiService {
|
|
async search (searchString: string) {
|
|
const { data } = await axios.get('/api/search', {
|
|
params: {
|
|
query: searchString
|
|
}
|
|
})
|
|
return data
|
|
}
|
|
}
|
|
|
|
const wikiServiceInstance = new WikiService()
|
|
|
|
export { wikiServiceInstance as WikiService }
|