Skip to content

Commit

Permalink
fix(Azure): Fixed using incorrect table name. (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaksh01 authored Jun 25, 2024
1 parent 7c9f535 commit b3ba409
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit b3ba409

Please sign in to comment.