Skip to content

Commit

Permalink
Merge pull request #56 from MahdiyarGHD/develop
Browse files Browse the repository at this point in the history
fix: Fixed GetValidToken response
  • Loading branch information
Ali-YousefiTelori authored Feb 26, 2024
2 parents ae0a5be + 9063b8c commit cccfe1a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1437,15 +1437,15 @@ public string BaseUrl

/// <returns>Success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public virtual System.Threading.Tasks.Task<MessageContract> GetValidTokenAsync(GetValidTokenRequestContract body)
public virtual System.Threading.Tasks.Task<ResetPasswordTokenContractMessageContract> GetValidTokenAsync(GetValidTokenRequestContract body)
{
return GetValidTokenAsync(body, System.Threading.CancellationToken.None);
}

/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <returns>Success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public virtual async System.Threading.Tasks.Task<MessageContract> GetValidTokenAsync(GetValidTokenRequestContract body, System.Threading.CancellationToken cancellationToken)
public virtual async System.Threading.Tasks.Task<ResetPasswordTokenContractMessageContract> GetValidTokenAsync(GetValidTokenRequestContract body, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ResetPasswordToken/GetValidToken");
Expand Down Expand Up @@ -1486,7 +1486,7 @@ public virtual async System.Threading.Tasks.Task<MessageContract> GetValidTokenA
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
var objectResponse_ = await ReadObjectResponseAsync<MessageContract>(response_, headers_, cancellationToken).ConfigureAwait(false);
var objectResponse_ = await ReadObjectResponseAsync<ResetPasswordTokenContractMessageContract>(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -801,17 +801,17 @@
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/MessageContract"
"$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageContract"
"$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/MessageContract"
"$ref": "#/components/schemas/ResetPasswordTokenContractMessageContract"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<IsPackable>true</IsPackable>
<Version>0.0.0.21</Version>
<Version>0.0.0.22</Version>
<Description>client generated code.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>microservice,auth,authentication,client</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public ResetPasswordTokenController(IBaseUnitOfWork unitOfWork) : base(unitOfWor
}

[HttpPost]
public async Task<MessageContract> GetValidToken(GetValidTokenRequestContract request)
public async Task<MessageContract<ResetPasswordTokenContract>> GetValidToken(GetValidTokenRequestContract request)
{
return await _unitOfWork.GetContractLogic<ResetPasswordTokenEntity, ResetPasswordTokenContract, long>().GetBy(x => x.Token.Equals(request.Token) && !x.HasConsumed && !x.IsDeleted && x.ExpirationDateTime >= DateTime.Now);
}
Expand Down

0 comments on commit cccfe1a

Please sign in to comment.