Fixed routes and bugs

This commit is contained in:
2026-03-27 23:06:17 +01:00
parent 8e678435f4
commit 744ce1ae96
18 changed files with 72 additions and 101 deletions
@@ -32,9 +32,7 @@ namespace Musify.Infrastructure.MassTransit.Activities
executeContext.CancellationToken);
var destinationPath = executeContext.GetVariable<string>(executeContext.Arguments.DestinationFilePathVariableName);
if (string.IsNullOrWhiteSpace(destinationPath))
throw new InvalidOperationException(
$"Download activity requires variable '{executeContext.Arguments.DestinationFilePathVariableName}' with destination file path.");
ArgumentNullException.ThrowIfNull(destinationPath, nameof(destinationPath));
try
{
@@ -32,16 +32,10 @@ namespace Musify.Infrastructure.MassTransit.Activities
executeContext.CancellationToken);
var folderPath = executeContext.GetVariable<string>(executeContext.Arguments.SourceDirectoryVariableName);
if (string.IsNullOrWhiteSpace(folderPath))
throw new InvalidOperationException(
$"Transfer activity requires variable '{executeContext.Arguments.SourceDirectoryVariableName}' with source directory path.");
ArgumentNullException.ThrowIfNull(folderPath, nameof(folderPath));
var destinationKeyName = executeContext.Arguments.DestinationKeyName;
if (string.IsNullOrWhiteSpace(destinationKeyName) && !string.IsNullOrWhiteSpace(executeContext.Arguments.DestinationKeyNameVariableName))
destinationKeyName = executeContext.GetVariable<string>(executeContext.Arguments.DestinationKeyNameVariableName);
if (string.IsNullOrWhiteSpace(destinationKeyName))
throw new InvalidOperationException("Transfer activity requires a destination key name from arguments or variables.");
ArgumentNullException.ThrowIfNull(destinationKeyName, nameof(destinationKeyName));
try
{
@@ -32,8 +32,7 @@ namespace Musify.Infrastructure.MassTransit.Activities.Files
executeContext.CancellationToken);
var sourceFilePath = executeContext.GetVariable<string>(executeContext.Arguments.FilePathVariableName);
if (string.IsNullOrEmpty(sourceFilePath))
throw new InvalidOperationException($"Upload activity requires variable '{executeContext.Arguments.FilePathVariableName}' with source file path.");
ArgumentNullException.ThrowIfNull(sourceFilePath, nameof(sourceFilePath));
var fileName = Path.GetFileName(sourceFilePath);
try