version up

This commit is contained in:
2023-07-31 17:11:39 +08:00
parent befbc7fc9b
commit 8419c9d389
41 changed files with 1053 additions and 286 deletions

View File

@@ -1,5 +1,4 @@
using Microsoft.Extensions.Logging;
using SQLite;
using SQLite;
namespace Blahblah.FlowerApp.Data;
@@ -12,6 +11,8 @@ internal sealed class Constants
public const string LastTokenName = "last_token";
public const string BaseUrl = "https://app.blahblaho.com";
public const string AppVersion = "0.2.731";
public const string UserAgent = $"FlowerApp/{AppVersion}";
public const SQLiteOpenFlags SQLiteFlags =
SQLiteOpenFlags.ReadWrite |
@@ -32,7 +33,7 @@ internal sealed class Constants
authorization = auth;
}
public static async Task<Definitions?> Initialize(ILogger logger, string? version, CancellationToken cancellation = default)
public static async Task<Definitions?> Initialize(ILoggerContent logger, string? version, CancellationToken cancellation = default)
{
try
{
@@ -47,7 +48,7 @@ internal sealed class Constants
}
catch (Exception ex)
{
logger.LogError("error occurs on fetching version and definitions, {error}", ex);
logger.LogError(ex, $"error occurs on fetching version and definitions, {ex.Message}");
}
return null;