Skip to content

Commit

Permalink
Some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LastBrainiac committed May 5, 2024
1 parent 78160f5 commit 2c0f937
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
- 5432:5432
volumes:
- /var/lib/postgresql/data

mongodb:
image: mongo
environment:
Expand All @@ -16,3 +17,15 @@ services:
- 27017:27017
volumes:
- /var/lib/mongodb/data

mongoexpress:
image: mongo-express
environment:
- ME_CONFIG_MONGODB_SERVER=mongodb
- ME_CONFIG_MONGODB_ADMINUSERNAME=root
- ME_CONFIG_MONGODB_ADMINPASSWORD=mongopw
ports:
- 8081:8081
depends_on:
- mongodb

4 changes: 3 additions & 1 deletion src/AuctionService/AuctionService.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
<PackageReference Include="MassTransit.RabbitMQ" Version="8.0.16" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.9" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.9" />
Expand All @@ -19,8 +19,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="6.34.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.4" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.34.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/SearchService/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Add services to the container.

builder.Services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
builder.Services.AddHttpClient<AuctionSvcHttpClient>().AddPolicyHandler(GetPolicy());
builder.Services.AddHttpClient<AuctionSvcHttpClient>(conf => conf.BaseAddress = new Uri(builder.Configuration["AuctionServiceUrl"])).AddPolicyHandler(GetPolicy());


builder.Services.AddControllers();
Expand Down
2 changes: 1 addition & 1 deletion src/SearchService/Services/AuctionSvcHttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public async Task<List<Item>> GetItemsForSearchDb()
.Project(x => x.UpdatedAt.ToString())
.ExecuteFirstAsync();

return await _httpClient.GetFromJsonAsync<List<Item>>(_config["AuctionServiceUrl"] + "/api/auctions?date=" + lastUpdated);
return await _httpClient.GetFromJsonAsync<List<Item>>("/api/auctions?date=" + lastUpdated);
}
}
}

0 comments on commit 2c0f937

Please sign in to comment.