feat(controller): add endpoint to retrieve last used receiver name by email
- Implemented `Get` endpoint in `EnvelopeReceiverController` to fetch the last used receiver's name by email. - Added handling for successful and failed responses, including proper status codes and logging.
This commit is contained in:
@@ -78,7 +78,7 @@ namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||
|
||||
public async Task<EnvelopeReceiver?> ReadLastByReceiver(string email)
|
||||
{
|
||||
return await _dbSet.Where(er => er.Receiver!.EmailAddress == email).LastOrDefaultAsync();
|
||||
return await _dbSet.Where(er => er.Receiver!.EmailAddress == email).OrderBy(er => er.EnvelopeId).LastOrDefaultAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user