Skip to content
This repository has been archived by the owner on Jan 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from lucr4ft/hotfix/1
Browse files Browse the repository at this point in the history
fix issue where wrong request type was sent
  • Loading branch information
lucalewin authored Jan 18, 2021
2 parents ab8e242 + 1e3c819 commit 56b2141
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions LucraftDB-ClientAPI/CollectionReference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ public DocumentReference GetDocument(string id)

public CollectionSnapshot Get()
{
string req = $"get /{DbID}/{ID}/*";
string req = $"{RequestType.Get} /{DbID}/{ID}/*";
string res = DataStorage.MakeRequest(req);
return JsonConvert.DeserializeObject<CollectionSnapshot>(res);
}

public WriteResult Set(object data)
{
string req = $"get /{DbID}/{ID}/* {JsonConvert.SerializeObject(data)}";
string req = $"{RequestType.Set} /{DbID}/{ID}/* {JsonConvert.SerializeObject(data)}";
string res = DataStorage.MakeRequest(req);
return JsonConvert.DeserializeObject<WriteResult>(res);
}

public QuerySnapshot Query(string queryStr)
{
string req = $"get /{DbID}/{ID}/* where {queryStr}";
string req = $"{RequestType.Get} /{DbID}/{ID}/* where {queryStr}";
string res = DataStorage.MakeRequest(req);
return JsonConvert.DeserializeObject<QuerySnapshot>(res);
}
Expand Down

0 comments on commit 56b2141

Please sign in to comment.