Fix in variable names

This commit is contained in:
Ignacio Gomez 2025-06-23 01:55:30 -06:00
parent 0f9a4c2af2
commit eae1e1580e

View File

@ -38,13 +38,13 @@ namespace Core.Inventory.Provider.Providers.Inventory
/// <summary> /// <summary>
/// Changes the status of a FurnitureBase entity. /// Changes the status of a FurnitureBase entity.
/// </summary> /// </summary>
/// <param name="id">The furniture base identifier.</param> /// <param name="mongoId">The furniture base identifier.</param>
/// <param name="newStatus">The new status to apply.</param> /// <param name="newStatus">The new status to apply.</param>
/// <param name="cancellationToken">Cancellation token.</param> /// <param name="cancellationToken">Cancellation token.</param>
/// <returns>The updated <see cref="FurnitureBase"/>.</returns> /// <returns>The updated <see cref="FurnitureBase"/>.</returns>
public async ValueTask<FurnitureBase> ChangeStatusAsync(string id, StatusEnum newStatus, CancellationToken cancellationToken) public async ValueTask<FurnitureBase> ChangeStatusAsync(string mongoId, StatusEnum newStatus, CancellationToken cancellationToken)
{ {
var entity = await repository.FindByIdAsync(id); var entity = await repository.FindByIdAsync(mongoId);
entity.Status = newStatus; entity.Status = newStatus;
await repository.ReplaceOneAsync(entity); await repository.ReplaceOneAsync(entity);
return entity; return entity;
@ -83,17 +83,17 @@ namespace Core.Inventory.Provider.Providers.Inventory
/// <summary> /// <summary>
/// Gets a FurnitureBase entity by its ID. /// Gets a FurnitureBase entity by its ID.
/// </summary> /// </summary>
/// <param name="_id">The furniture base identifier.</param> /// <param name="mongoId">The furniture base identifier.</param>
/// <param name="cancellationToken">Cancellation token.</param> /// <param name="cancellationToken">Cancellation token.</param>
/// <returns>The corresponding <see cref="FurnitureBase"/>.</returns> /// <returns>The corresponding <see cref="FurnitureBase"/>.</returns>
public async ValueTask<FurnitureBase> GetByIdAsync(string _id, CancellationToken cancellationToken) public async ValueTask<FurnitureBase> GetByIdAsync(string mongoId, CancellationToken cancellationToken)
{ {
var cacheKey = CacheKeyHelper.GenerateCacheKey(this, nameof(GetByIdAsync), _id); var cacheKey = CacheKeyHelper.GenerateCacheKey(this, nameof(GetByIdAsync), mongoId);
var cached = await cacheProvider.GetAsync<FurnitureBase>(cacheKey); var cached = await cacheProvider.GetAsync<FurnitureBase>(cacheKey);
if (cached is not null) return cached; if (cached is not null) return cached;
var result = await repository.FindByIdAsync(_id); var result = await repository.FindByIdAsync(mongoId);
await cacheProvider.SetAsync(cacheKey, result); await cacheProvider.SetAsync(cacheKey, result);
return result; return result;
} }