Allow UI to delete sessions

This commit is contained in:
2024-09-07 22:26:38 -05:00
parent 0eb75994c9
commit 6b5bb96de7
11 changed files with 162 additions and 21 deletions

View File

@@ -70,5 +70,10 @@ public class ShogiApi(HttpClient httpClient)
return httpClient.PatchAsync(Relative($"Sessions/{name}/Join"), null);
}
public Task<HttpResponseMessage> DeleteSession(Guid sessionId)
{
return httpClient.DeleteAsync(Relative($"Sessions/{sessionId}"));
}
private static Uri Relative(string path) => new(path, UriKind.Relative);
}