Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed GetValidToken response #56

Merged
merged 2 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading