From 547d01e179e8bac41237873342042c0f7bfcf15d Mon Sep 17 00:00:00 2001 From: oneRain Date: Thu, 18 Feb 2021 11:20:29 +0800 Subject: [PATCH] fix: LCQuery.Get() support include --- Storage/Storage/LCQuery.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Storage/Storage/LCQuery.cs b/Storage/Storage/LCQuery.cs index c9396f74..b04d4574 100644 --- a/Storage/Storage/LCQuery.cs +++ b/Storage/Storage/LCQuery.cs @@ -351,7 +351,14 @@ public async Task Get(string objectId) { throw new ArgumentNullException(nameof(objectId)); } string path = $"classes/{ClassName}/{objectId}"; - Dictionary response = await LCApplication.HttpClient.Get>(path); + Dictionary queryParams = null; + string includes = Condition.BuildIncludes(); + if (!string.IsNullOrEmpty(includes)) { + queryParams = new Dictionary { + { "include", includes } + }; + } + Dictionary response = await LCApplication.HttpClient.Get>(path, queryParams: queryParams); return DecodeLCObject(response); }