Skip to content

Commit

Permalink
fix: LCQuery.Get() support include
Browse files Browse the repository at this point in the history
  • Loading branch information
onerain88 committed Feb 18, 2021
1 parent 36ed298 commit 547d01e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Storage/Storage/LCQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,14 @@ public async Task<T> Get(string objectId) {
throw new ArgumentNullException(nameof(objectId));
}
string path = $"classes/{ClassName}/{objectId}";
Dictionary<string, object> response = await LCApplication.HttpClient.Get<Dictionary<string, object>>(path);
Dictionary<string, object> queryParams = null;
string includes = Condition.BuildIncludes();
if (!string.IsNullOrEmpty(includes)) {
queryParams = new Dictionary<string, object> {
{ "include", includes }
};
}
Dictionary<string, object> response = await LCApplication.HttpClient.Get<Dictionary<string, object>>(path, queryParams: queryParams);
return DecodeLCObject(response);
}

Expand Down

0 comments on commit 547d01e

Please sign in to comment.