mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-10 02:54:15 +00:00
implement Search
model
This commit is contained in:
parent
f3bb1a0500
commit
55a78a9b70
26
packages/comty.js/src/models/search/index.js
Normal file
26
packages/comty.js/src/models/search/index.js
Normal file
@ -0,0 +1,26 @@
|
||||
import request from "../../handlers/request"
|
||||
|
||||
export default class Search {
|
||||
static search = async (keywords, params = {}) => {
|
||||
const { data } = await request({
|
||||
method: "GET",
|
||||
url: `/search`,
|
||||
params: {
|
||||
keywords: keywords,
|
||||
params: params
|
||||
}
|
||||
})
|
||||
|
||||
return data
|
||||
}
|
||||
|
||||
static async quickSearch(params) {
|
||||
const response = await request({
|
||||
method: "GET",
|
||||
url: "/search/quick",
|
||||
params: params
|
||||
})
|
||||
|
||||
return response.data
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user