Skip to content

Commit 016c287

Browse files
authored
Release v0.6.2
- Removes get by user methods
1 parent 315ff88 commit 016c287

16 files changed

Lines changed: 23 additions & 24 deletions

File tree

src/api/core/FinancialHub.Core.Application/Services/AccountsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public async Task<ServiceResult<int>> DeleteAsync(Guid id)
3131
return await this.provider.DeleteAsync(id);
3232
}
3333

34-
public async Task<ServiceResult<ICollection<AccountDto>>> GetAllByUserAsync(string userId)
34+
public async Task<ServiceResult<ICollection<AccountDto>>> GetAllAsync()
3535
{
3636
var accounts = await this.provider.GetAllAsync();
3737

src/api/core/FinancialHub.Core.Application/Services/CategoriesService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public async Task<ServiceResult<int>> DeleteAsync(Guid id)
3131
return await this.provider.DeleteAsync(id);
3232
}
3333

34-
public async Task<ServiceResult<ICollection<CategoryDto>>> GetAllByUserAsync(string userId)
34+
public async Task<ServiceResult<ICollection<CategoryDto>>> GetAllAsync()
3535
{
3636
var categories = await this.provider.GetAllAsync();
3737

src/api/core/FinancialHub.Core.Application/Services/TransactionsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public async Task<ServiceResult<int>> DeleteAsync(Guid id)
7474
return await this.transactionsProvider.DeleteAsync(id);
7575
}
7676

77-
public async Task<ServiceResult<ICollection<TransactionDto>>> GetAllByUserAsync(string userId, TransactionFilter filter)
77+
public async Task<ServiceResult<ICollection<TransactionDto>>> GetAllAsync(TransactionFilter filter)
7878
{
7979
var transactions = await this.transactionsProvider.GetAllAsync(filter);
8080

src/api/core/FinancialHub.Core.Domain/Interfaces/Repositories/IAccountsRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ namespace FinancialHub.Core.Domain.Interfaces.Repositories
55
{
66
public interface IAccountsRepository : IBaseRepository<AccountEntity>
77
{
8-
//Task<ICollection<<AccountEntity>> GetByUserId(string userId);
8+
99
}
1010
}

src/api/core/FinancialHub.Core.Domain/Interfaces/Services/IAccountsService.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
using FinancialHub.Common.Results;
22
using FinancialHub.Core.Domain.DTOS.Accounts;
3-
using FinancialHub.Core.Domain.Models;
43

54
namespace FinancialHub.Core.Domain.Interfaces.Services
65
{
76
public interface IAccountsService
87
{
9-
Task<ServiceResult<ICollection<AccountDto>>> GetAllByUserAsync(string userId);
8+
Task<ServiceResult<ICollection<AccountDto>>> GetAllAsync();
109

1110
Task<ServiceResult<AccountDto>> GetByIdAsync(Guid id);
1211

src/api/core/FinancialHub.Core.Domain/Interfaces/Services/ICategoriesService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace FinancialHub.Core.Domain.Interfaces.Services
55
{
66
public interface ICategoriesService
77
{
8-
Task<ServiceResult<ICollection<CategoryDto>>> GetAllByUserAsync(string userId);
8+
Task<ServiceResult<ICollection<CategoryDto>>> GetAllAsync();
99

1010
Task<ServiceResult<CategoryDto>> CreateAsync(CreateCategoryDto category);
1111

src/api/core/FinancialHub.Core.Domain/Interfaces/Services/ITransactionsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace FinancialHub.Core.Domain.Interfaces.Services
66
{
77
public interface ITransactionsService
88
{
9-
Task<ServiceResult<ICollection<TransactionDto>>> GetAllByUserAsync(string userId, TransactionFilter filter);
9+
Task<ServiceResult<ICollection<TransactionDto>>> GetAllAsync(TransactionFilter filter);
1010

1111
Task<ServiceResult<TransactionDto>> GetByIdAsync(Guid id);
1212

src/api/core/FinancialHub.Core.WebApi/Controllers/AccountsController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ public async Task<IActionResult> GetAccountBalances([FromRoute] Guid accountId)
4141
}
4242

4343
/// <summary>
44-
/// Get all accounts of the system (will be changed to only one user)
44+
/// Get all accounts of the system
4545
/// </summary>
4646
[HttpGet]
4747
[ProducesResponseType(typeof(ListResponse<AccountDto>), 200)]
4848
public async Task<IActionResult> GetMyAccounts()
4949
{
50-
var result = await service.GetAllByUserAsync("mock");
50+
var result = await service.GetAllAsync();
5151

5252
return Ok(new ListResponse<AccountDto>(result.Data));
5353
}
5454

5555
/// <summary>
56-
/// Creates an account on database (will be changed to only one user)
56+
/// Creates an account on database
5757
/// </summary>
5858
/// <param name="account">Account to be created</param>
5959
[HttpPost]

src/api/core/FinancialHub.Core.WebApi/Controllers/CategoriesController.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ public CategoriesController(ICategoriesService service)
1515
}
1616

1717
/// <summary>
18-
/// Get all categorys of the system (will be changed to only one user)
18+
/// Get all categorys of the system
1919
/// </summary>
2020
[HttpGet]
2121
[ProducesResponseType(typeof(ListResponse<CategoryDto>), 200)]
2222
public async Task<IActionResult> GetMyCategories()
2323
{
24-
var result = await service.GetAllByUserAsync("mock");
24+
var result = await service.GetAllAsync();
2525

2626
return Ok(new ListResponse<CategoryDto>(result.Data));
2727
}
2828

2929
/// <summary>
30-
/// Creates an category on database (will be changed to only one user)
30+
/// Creates an category on database
3131
/// </summary>
3232
/// <param name="category">Account to be created</param>
3333
[HttpPost]

src/api/core/FinancialHub.Core.WebApi/Controllers/TransactionsController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public TransactionsController(ITransactionsService service)
2222
[ProducesResponseType(typeof(ListResponse<TransactionDto>), 200)]
2323
public async Task<IActionResult> GetMyTransactions([FromQuery] TransactionFilter filter)
2424
{
25-
var response = await service.GetAllByUserAsync("mock", filter);
25+
var response = await service.GetAllAsync(filter);
2626
return Ok(new ListResponse<TransactionDto>(response.Data));
2727
}
2828

0 commit comments

Comments
 (0)