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

Fixed using incorrect table name. #158

Merged
Merged
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
9 changes: 5 additions & 4 deletions src/BaGetter.Azure/Table/TableSearchService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@
using Azure.Data.Tables;
using BaGetter.Core;
using BaGetter.Protocol.Models;
using Microsoft.Extensions.Options;

namespace BaGetter.Azure
{
public class TableSearchService : ISearchService
{
private const string TableName = "Packages";

private readonly TableClient _table;
private readonly ISearchResponseBuilder _responseBuilder;

public TableSearchService(
TableServiceClient client,
ISearchResponseBuilder responseBuilder)
ISearchResponseBuilder responseBuilder,
IOptionsSnapshot<AzureTableOptions> options)
{
ArgumentNullException.ThrowIfNull(client, nameof(client));
ArgumentNullException.ThrowIfNull(responseBuilder, nameof(responseBuilder));
ArgumentNullException.ThrowIfNull(options, nameof(options));

_table = client.GetTableClient(TableName);
_table = client.GetTableClient(options.Value.TableName);
_responseBuilder = responseBuilder;
}

Expand Down