mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
Merge branch 'develop' of https://github.com/Kareadita/Kavita into develop
This commit is contained in:
commit
d8a9a95fc9
@ -16,7 +16,6 @@ namespace API.Extensions
|
||||
{
|
||||
services.AddHttpClient<StatsApiClient>(client =>
|
||||
{
|
||||
client.BaseAddress = new Uri("https://stats.kavitareader.com");
|
||||
client.DefaultRequestHeaders.Add("api-key", "MsnvA2DfQqxSK5jh");
|
||||
});
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Json;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using API.Configurations.CustomOptions;
|
||||
@ -15,6 +16,7 @@ namespace API.Services.Clients
|
||||
private readonly HttpClient _client;
|
||||
private readonly StatsOptions _options;
|
||||
private readonly ILogger<StatsApiClient> _logger;
|
||||
private const string ApiUrl = "http://stats.kavitareader.com";
|
||||
|
||||
public StatsApiClient(HttpClient client, IOptions<StatsOptions> options, ILogger<StatsApiClient> logger)
|
||||
{
|
||||
@ -29,7 +31,7 @@ namespace API.Services.Clients
|
||||
|
||||
try
|
||||
{
|
||||
var response = await _client.PostAsJsonAsync("/api/InstallationStats", data);
|
||||
using var response = await _client.PostAsJsonAsync(ApiUrl + "/api/InstallationStats", data);
|
||||
|
||||
responseContent = await response.Content.ReadAsStringAsync();
|
||||
|
||||
|
@ -34,9 +34,6 @@ Package()
|
||||
local runtime="$2"
|
||||
local lOutputFolder=../_output/"$runtime"/Kavita
|
||||
|
||||
echo "Integrity check on root folder"
|
||||
ls -l
|
||||
|
||||
ProgressStart "Creating $runtime Package for $framework"
|
||||
|
||||
# TODO: Use no-restore? Because Build should have already done it for us
|
||||
@ -45,14 +42,11 @@ Package()
|
||||
echo dotnet publish -c Release --no-restore --self-contained --runtime $runtime -o "$lOutputFolder" --framework $framework
|
||||
dotnet publish -c Release --no-restore --self-contained --runtime $runtime -o "$lOutputFolder" --framework $framework
|
||||
|
||||
echo "Integrity check on API wwwroot folder"
|
||||
ls -l "$lOutputFolder"/wwwroot
|
||||
|
||||
echo "Renaming API -> Kavita"
|
||||
mv "$lOutputFolder"/API "$lOutputFolder"/Kavita
|
||||
|
||||
echo "Integrity check on Kavita wwwroot folder"
|
||||
ls -l "$lOutputFolder"/wwwroot
|
||||
echo "Copying webui wwwroot to build"
|
||||
cp -r wwwroot/* "$lOutputFolder"/wwwroot/
|
||||
|
||||
echo "Copying Install information"
|
||||
cp ../INSTALL.txt "$lOutputFolder"/README.txt
|
||||
|
Loading…
x
Reference in New Issue
Block a user