mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
20 lines
329 B
JavaScript
20 lines
329 B
JavaScript
import { Extension } from "@db_models"
|
|
|
|
export default {
|
|
key: "extensions",
|
|
model: Extension,
|
|
query: (keywords) => {
|
|
const [name, version] = keywords.split("@")
|
|
|
|
const build = {
|
|
name: { $regex: name, $options: "i" },
|
|
}
|
|
|
|
if (version) {
|
|
build.version = { $regex: version, $options: "i" }
|
|
}
|
|
|
|
return build
|
|
},
|
|
}
|