Skip to content

Commit

Permalink
Remove unused codes
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiyarGHD committed Nov 21, 2023
1 parent 9120c42 commit 18a44c6
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 207 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

<ItemGroup>
<Folder Include="DatabaseLogics\" />
<Folder Include="Interfaces\" />
<Folder Include="Mappers\" />
</ItemGroup>

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using EasyMicroservices.AuthenticationsMicroservice.Contracts.Responses;
using EasyMicroservices.AuthenticationsMicroservice.Database.Entities;
using EasyMicroservices.AuthenticationsMicroservice.Helpers;
using EasyMicroservices.AuthenticationsMicroservice.Interfaces;
using EasyMicroservices.Cores.AspCoreApi;
using EasyMicroservices.Cores.AspEntityFrameworkCoreApi.Interfaces;
using EasyMicroservices.ServiceContracts;
Expand All @@ -15,12 +14,10 @@ namespace EasyMicroservices.AuthenticationsMicroservice.WebApi.Controllers
public class UsersController : SimpleQueryServiceController<UserEntity, AddUserRequestContract, UserContract, UserContract, long>
{
private readonly IUnitOfWork _unitOfWork;
//private readonly IJWTManager _jwtManager;

public UsersController(IUnitOfWork unitOfWork/*, IJWTManager jwtManager*/) : base(unitOfWork)
public UsersController(IUnitOfWork unitOfWork) : base(unitOfWork)
{
_unitOfWork = unitOfWork;
//_jwtManager = jwtManager;
}

[HttpPost]
Expand All @@ -35,96 +32,6 @@ public async Task<MessageContract<UserContract>> VerifyUserIdentity(UserSummaryC
return await _unitOfWork.GetContractLogic<UserEntity, AddUserRequestContract, UserContract, UserContract, long>().GetBy(x => x.UserName == request.UserName && x.Password == request.Password);
}

//[HttpPost]
//public async Task<MessageContract<bool>> VerifyUserName(VerifyEmailAddressContract request)
//{
// var logic = _unitOfWork.GetLongContractLogic<UserEntity, AddUserRequestContract, UserContract, UserContract>();
// var user = await logic.GetById(new Cores.Contracts.Requests.GetIdRequestContract<long> { Id = request.UserId }).AsCheckedResult();
// if (user.IsUsernameVerified)
// return true;

// await logic.Update(new UserContract
// {
// CreationDateTime = user.CreationDateTime,
// DeletedDateTime = user.DeletedDateTime,
// Id = user.Id,
// IsDeleted = user.IsDeleted,
// IsUsernameVerified = true,
// ModificationDateTime = user.ModificationDateTime,
// Password = user.Password,
// UniqueIdentity = user.UniqueIdentity,
// UserName = user.UserName,
// }).AsCheckedResult();

// return true;

//}
//[HttpPost]
//public async Task<MessageContract<long>> Register(AddUserRequestContract request)
//{
// return await _jwtManager.Register(request);
//}

//[HttpPost]
//public async Task<MessageContract<long>> Login(UserSummaryContract request)
//{
// string password = await AuthenticationHelper.HashPassword(request.Password);
// request.Password = password;

// var response = await _jwtManager.Login(request);

// return response;
//}

//[HttpPost]
//public async Task<MessageContract<UserResponseContract>> GenerateToken(UserClaimContract request)
//{
// string password = await AuthenticationHelper.HashPassword(request.Password);
// request.Password = password;

// var response = await _jwtManager.GenerateToken(request);

// return response;
//}

//[HttpPost]
//public async Task<MessageContract<UserResponseContract>> RegenerateToken(RegenerateTokenContract request)
//{
// var logic = _unitOfWork.GetLongContractLogic<UserEntity, AddUserRequestContract, UserContract, UserContract>();
// var user = await logic.GetById(new Cores.Contracts.Requests.GetIdRequestContract<long>
// {
// Id = request.UserId
// });

// if (user)
// {

// string password = user.Result.Password;

// var req = new UserClaimContract
// {
// Password = password,
// UserName = user.Result.UserName,
// Claims = request.Claims
// };

// var response = await _jwtManager.GenerateToken(req);

// return new UserResponseContract
// {
// Token = response.Result.Token
// };
// }

// return user.ToContract<UserResponseContract>();
//}

//[HttpGet]
//[Authorize]
//public string Test()
//{
// return "test";
//}


}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using EasyMicroservices.AuthenticationsMicroservice.Database.Contexts;
using EasyMicroservices.AuthenticationsMicroservice.Interfaces;
using EasyMicroservices.Cores.AspEntityFrameworkCoreApi;
using EasyMicroservices.Cores.AspEntityFrameworkCoreApi.Interfaces;
using EasyMicroservices.Cores.Interfaces;
Expand Down

0 comments on commit 18a44c6

Please sign in to comment.