mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 23:33:12 +09:00
Add search mods request
Add paged search mods request suitable for showing a real time list of results for a user provided search expression.
This commit is contained in:
1 parent
6039715a53
commit
3eb63db313
5 files changed
+200
-2
No files matched your search
@@ -800,6 +800,42 @@ messages.listMods = new Request({
|
||||
},
|
||||
});
|
||||
|
||||
messages.searchMods = new Request({
|
||||
type: "search_mods",
|
||||
links: ["control-master"],
|
||||
permission: "core.mod.search",
|
||||
requestRequired: ["query", "factorio_version", "page"],
|
||||
requestProperties: {
|
||||
"query": { type: "string" },
|
||||
"factorio_version": { type: "string" },
|
||||
"page_size": { type: "integer" },
|
||||
"page": { type: "integer" },
|
||||
"sort": { type: "string" },
|
||||
"sort_order": { type: "string" },
|
||||
},
|
||||
responseProperties: {
|
||||
"query_issues": {
|
||||
type: "array",
|
||||
items: { type: "string" },
|
||||
},
|
||||
"page_count": { type: "integer" },
|
||||
"result_count": { type: "integer" },
|
||||
"results": {
|
||||
type: "array",
|
||||
items: {
|
||||
type: "object",
|
||||
properties: {
|
||||
"name": { type: "string" },
|
||||
"versions": {
|
||||
type: "array",
|
||||
items: libData.ModInfo.jsonSchema,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
messages.setModSubscriptions = new Request({
|
||||
type: "set_mod_subscriptions",
|
||||
links: ["control-master"],
|
||||
|
||||
@@ -553,7 +553,13 @@ definePermission({
|
||||
definePermission({
|
||||
name: "core.mod.list",
|
||||
title: "List mods",
|
||||
description: "Get the full list of mods stored on the master",
|
||||
description: "Get the full list of mods stored on the master.",
|
||||
grantByDefault: true,
|
||||
});
|
||||
definePermission({
|
||||
name: "core.mod.search",
|
||||
title: "Search mods",
|
||||
description: "Search through the list of mods stored on the master.",
|
||||
grantByDefault: true,
|
||||
});
|
||||
definePermission({
|
||||
|
||||
Reference in new issue
Block a user