refacto chathub

This commit is contained in:
Paul Schneider 2026-07-04 15:28:07 +01:00
commit 1d26cbdf3d
8 changed files with 107 additions and 113 deletions

View file

@ -3,13 +3,13 @@ using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Yavsc.Attributes.Validation;
using Yavsc.Helpers;
using Yavsc.Models;
using Yavsc.Models.Messaging;
using Yavsc.Services;
using Microsoft.AspNetCore.SignalR;
using Yavsc.Server.Helpers;
using static Yavsc.Blogs.Constants;
using Yavsc.Server.Hubs;
namespace Yavsc.Blogs.Controllers
{
@ -46,7 +46,7 @@ namespace Yavsc.Blogs.Controllers
}
logger.LogInformation("validated: api/stream/Put: "+filename);
var userName = User.GetUserName();
string url = string.Format(
"{0}/{1}/{2}",
Config.UserFilesOptions.RequestPath.ToUriComponent(),
@ -54,7 +54,7 @@ namespace Yavsc.Blogs.Controllers
filename
);
string destDir = HttpContext.User.EnsureDestinationDirectory(filePath);
logger.LogInformation($"Saving flow to {destDir}");
var userId = User.GetUserId();
@ -65,7 +65,7 @@ namespace Yavsc.Blogs.Controllers
sender = userName,
url = url,
}, $"{userName} is starting a stream!");
await liveProcessor.AcceptStream(HttpContext, user, destDir, shortFileName);
return Ok();
}