mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 17:11:10 +00:00
Merge pull request #124 from BinaryAlley/documentation/improve-code-documentation
Improves code documentation
This commit is contained in:
3 files changed
+7
-6
No files matched your search
+4
-4
@@ -65,10 +65,10 @@ public class RegisterUserCommandHandler : IRequestHandler<RegisterUserCommand, E
|
|||||||
{
|
{
|
||||||
// check if any users already exists (admin account is only set once!)
|
// check if any users already exists (admin account is only set once!)
|
||||||
IUserRepository userRepository = _unitOfWork.GetRepository<IUserRepository>();
|
IUserRepository userRepository = _unitOfWork.GetRepository<IUserRepository>();
|
||||||
ErrorOr<UserEntity?> getUserRResult = await userRepository.GetByUsernameAsync(request.Username!, cancellationToken).ConfigureAwait(false);
|
ErrorOr<UserEntity?> getUserResult = await userRepository.GetByUsernameAsync(request.Username!, cancellationToken).ConfigureAwait(false);
|
||||||
if (getUserRResult.IsError)
|
if (getUserResult.IsError)
|
||||||
return getUserRResult.Errors;
|
return getUserResult.Errors;
|
||||||
else if (getUserRResult.Value is not null)
|
else if (getUserResult.Value is not null)
|
||||||
return Errors.Authentication.UsernameAlreadyExists;
|
return Errors.Authentication.UsernameAlreadyExists;
|
||||||
string? totpSecret = null;
|
string? totpSecret = null;
|
||||||
Guid id = Guid.NewGuid();
|
Guid id = Guid.NewGuid();
|
||||||
|
|||||||
+2
-1
@@ -81,7 +81,8 @@ internal class MediaLibraryScanningService : IMediaLibraryScanningService
|
|||||||
|
|
||||||
// get a media library scanner for the provided media library type
|
// get a media library scanner for the provided media library type
|
||||||
IMediaTypeScanner scanner = _mediaLibraryScannerFactory.CreateLibraryScanner(libraryType);
|
IMediaTypeScanner scanner = _mediaLibraryScannerFactory.CreateLibraryScanner(libraryType);
|
||||||
// get the list of scan jobs for the retrieved scanner
|
// get the list of scan jobs for the retrieved scanner. It is impotant to enumerate them here, because deferred execuction would destroy any graph relationships
|
||||||
|
// and properties we might set before putting the jobs on the in-memory queue.
|
||||||
List<IMediaLibraryScanJob> jobs = scanner.CreateScanJobsForLibrary(scan.LibraryId, downloadMedatadaFromWeb).ToList();
|
List<IMediaLibraryScanJob> jobs = scanner.CreateScanJobsForLibrary(scan.LibraryId, downloadMedatadaFromWeb).ToList();
|
||||||
|
|
||||||
// count total jobs in the chain by traversing the job graph
|
// count total jobs in the chain by traversing the job graph
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class Program
|
|||||||
logPath = Environment.GetEnvironmentVariable("LOG_PATH") ?? "/logs"; // use docker volume path
|
logPath = Environment.GetEnvironmentVariable("LOG_PATH") ?? "/logs"; // use docker volume path
|
||||||
builder.WebHost.ConfigureKestrel(options =>
|
builder.WebHost.ConfigureKestrel(options =>
|
||||||
{
|
{
|
||||||
options.ListenAnyIP(5214); // HTTP only
|
options.ListenAnyIP(5214); // HTTP only; also, the port is also the same port exposed in the Dockerfile
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user