Refactor EchoHub solution structure and remove unused components

- Deleted EchoHub.slnx and related project files for EchoHub.Web and EchoHub.Api.
- Removed ServerDirectoryDbContext, ServerDirectoryService, and related extensions and DTOs.
- Updated CommandHandler and Program.cs in EchoHub.Client to handle URL sending instead of file downloading.
- Added SendUrlRequest DTO and corresponding API endpoint in ChannelsController for handling URL uploads.
- Implemented database migration support in EchoHub.Server with initial migration setup.
- Adjusted Program.cs to include HTTP client configuration for image downloading.
- Cleaned up unnecessary files and references to streamline the project.
This commit is contained in:
HueByte
2026-02-19 03:51:38 +01:00
parent 287270b26d
commit ebc8fffec8
22 changed files with 772 additions and 358 deletions
+10
View File
@@ -173,6 +173,16 @@ public sealed class ApiClient : IDisposable
return await response.Content.ReadFromJsonAsync<MessageDto>();
}
public async Task<MessageDto?> SendUrlAsync(string channelName, string url)
{
EnsureAuthenticated();
var request = new SendUrlRequest(url);
var response = await AuthenticatedRequestAsync(() =>
_http.PostAsJsonAsync($"/api/channels/{Uri.EscapeDataString(channelName)}/send-url", request));
await EnsureSuccessAsync(response);
return await response.Content.ReadFromJsonAsync<MessageDto>();
}
public async Task<ChannelDto?> CreateChannelAsync(string name, string? topic = null)
{
EnsureAuthenticated();