**fixed** debug setting was a part of the last commit. appsettings.json was expected. Fixed with preprocessor directives.

This commit is contained in:
Aytac Kirmizi 2023-02-07 19:12:09 +01:00
parent bfa2c37210
commit 9b3c2733a0
6 changed files with 20 additions and 6 deletions

3
.gitignore vendored
View File

@ -5,4 +5,5 @@ riderModule.iml
/_ReSharper.Caches/
**/.env
.env
compose/
compose/
compose-test/

View File

@ -1 +0,0 @@
Linkding.Sync

View File

@ -10,10 +10,12 @@ IHost host = Host.CreateDefaultBuilder(args)
{
builder
.AddEnvironmentVariables()
.AddCommandLine(args)
#if DEBUG
.AddJsonFile("appsettings.json")
.AddJsonFile("appsettings.Development.json")
.AddUserSecrets<Program>(true);
#endif
.AddUserSecrets<Program>(true)
.AddCommandLine(args);
})
.Build();

View File

@ -26,6 +26,7 @@ public partial class WallabagService
while (allQuery.QueryLinks.Next != null && !string.IsNullOrEmpty(allQuery.QueryLinks.Next.Href))
{
// url = allQuery.QueryLinks.Next.Href.Replace(_settings.Url, "");
url = allQuery.QueryLinks.Next.Href;
if (_client.BaseAddress.Scheme == "https")
{
url = allQuery.QueryLinks.Next.Href.Replace("http://", "https://");

View File

@ -11,10 +11,12 @@ IHost host = Host.CreateDefaultBuilder(args)
{
builder
.AddEnvironmentVariables()
.AddCommandLine(args)
#if DEBUG
.AddJsonFile("appsettings.json")
.AddJsonFile("appsettings.Development.json")
.AddUserSecrets<Program>(true);
#endif
.AddUserSecrets<Program>(true)
.AddCommandLine(args);
})
.Build();

View File

@ -18,4 +18,13 @@
<ProjectReference Include="..\Services\Linkding.Client\Linkding.Client.csproj" />
<ProjectReference Include="..\Services\Wallabag.Client\Wallabag.Client.csproj" />
</ItemGroup>
<ItemGroup>
<Content Update="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Update="appsettings.Development.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>