mirror of
https://onedev.site.tesses.net/crosslang/crosslangextras
synced 2026-02-08 17:15:45 +00:00
Fix search
This commit is contained in:
@@ -143,12 +143,13 @@ class Tesses.CrossLang.PackageManager
|
|||||||
{
|
{
|
||||||
options = options ?? {};
|
options = options ?? {};
|
||||||
|
|
||||||
var urlBase = "/api/v1/search?q={Net.Http.UrlEncode(query)}";
|
var urlBase = $"/api/v1/search?q={Net.Http.UrlEncode(query)}";
|
||||||
if(TypeOf(options.type) == "String") urlBase += $"&type={Net.Http.UrlEncode(options.type)}";
|
if(TypeOf(options.type) == "String") urlBase += $"&type={Net.Http.UrlEncode(options.type)}";
|
||||||
if(TypeOf(options.pluginHost) == "String") urlBase += "&pluginHost={Net.Http.UrlEncode(options.pluginHost)}";
|
if(TypeOf(options.pluginHost) == "String") urlBase += $"&pluginHost={Net.Http.UrlEncode(options.pluginHost)}";
|
||||||
if(TypeOf(options.offset) == "Long") urlBase += $"&offset={options.offset}";
|
if(TypeOf(options.offset) == "Long") urlBase += $"&offset={options.offset}";
|
||||||
if(TypeOf(options.limit) == "Long") urlBase += $"&limit={options.limit}";
|
if(TypeOf(options.limit) == "Long") urlBase += $"&limit={options.limit}";
|
||||||
|
|
||||||
|
|
||||||
func handle(server)
|
func handle(server)
|
||||||
{
|
{
|
||||||
var req = Net.Http.MakeRequest($"{server.TrimEnd('/')}{urlBase}");
|
var req = Net.Http.MakeRequest($"{server.TrimEnd('/')}{urlBase}");
|
||||||
@@ -158,7 +159,6 @@ class Tesses.CrossLang.PackageManager
|
|||||||
var res2=Json.Decode(req.ReadAsString());
|
var res2=Json.Decode(req.ReadAsString());
|
||||||
return res2.packages;
|
return res2.packages;
|
||||||
}catch(ex) {
|
}catch(ex) {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user