some cleanup server side, increase api version to 2

This commit is contained in:
Stanley Dimant
2022-07-04 13:16:16 +02:00
parent 769f52b8a5
commit 7a2fb8d594
6 changed files with 448 additions and 389 deletions

View File

@@ -1,4 +1,5 @@
using System;
using MareSynchronos.API;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
@@ -85,16 +86,16 @@ namespace MareSynchronosServer
app.UseEndpoints(endpoints =>
{
endpoints.MapHub<ConnectionHub>("/heartbeat", options =>
endpoints.MapHub<ConnectionHub>(ConnectionHubAPI.Path, options =>
{
options.Transports = HttpTransportType.WebSockets;
});
endpoints.MapHub<UserHub>("/user", options =>
endpoints.MapHub<UserHub>(UserHubAPI.Path, options =>
{
options.Transports = HttpTransportType.WebSockets;
});
endpoints.MapHub<AdminHub>("/admin", options => options.Transports = HttpTransportType.WebSockets);
endpoints.MapHub<FilesHub>("/files", options =>
endpoints.MapHub<AdminHub>(AdminHubAPI.Path, options => options.Transports = HttpTransportType.WebSockets);
endpoints.MapHub<FilesHub>(FilesHubAPI.Path, options =>
{
options.ApplicationMaxBufferSize = long.MaxValue;
options.TransportMaxBufferSize = long.MaxValue;