Skip to content

Commit b225d63

Browse files
committed
Fix the staff search
1 parent 969a582 commit b225d63

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

WebUntisAPI.Client/WebUntisClient.Messages.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public async Task<MessagePerson[]> GetStaffFilterSearchResultAsync(string search
148148
{
149149
Method = HttpMethod.Post,
150150
RequestUri = new Uri(ServerUrl + $"/WebUntis/api/rest/view/v2/messages/recipients/STAFF/filter"),
151-
Content = new StringContent(sw.ToString())
151+
Content = new StringContent(sw.ToString(), Encoding.UTF8, "application/json")
152152
};
153153
request.Headers.Add("JSESSIONID", _sessionId);
154154
request.Headers.Add("schoolname", _schoolName);
@@ -169,7 +169,7 @@ public async Task<MessagePerson[]> GetStaffFilterSearchResultAsync(string search
169169
string responseString = await response.Content.ReadAsStringAsync();
170170

171171
JObject obj = JObject.Parse(responseString);
172-
return obj["users"].Value<List<MessagePerson>>().ToArray();
172+
return obj["users"].ToObject<List<MessagePerson>>().ToArray();
173173
}
174174

175175
/// <summary>

0 commit comments

Comments
 (0)