更新配置文件

This commit is contained in:
niyyzf 2024-06-29 19:22:47 +08:00
parent d1b230f5ff
commit e4eb2e8e20
4 changed files with 11 additions and 6 deletions

View File

@ -40,6 +40,9 @@
<None Update="markdowns\templates\巡检模板1.md">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="app.db">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>

View File

@ -47,11 +47,11 @@ builder.Services.AddSignalR();
var connectionString = builder.Configuration.GetConnectionString("DefaultConnection");
var sqlConnectionString = builder.Configuration.GetConnectionString("SqliteConnection");
builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseNpgsql(connectionString));
// builder.Services.AddDbContext<ApplicationDbContext>(options =>
// options.UseSqlite(sqlConnectionString));
// options.UseNpgsql(connectionString));
builder.Services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlite(sqlConnectionString));
builder.Services.AddIdentity<ApplicationUser, ApplicationRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()

View File

@ -9,7 +9,7 @@
"AllowedHosts": "*",
"ConnectionStrings": {
"DefaultConnection": "Host=192.168.0.26;Port=54321;Username=SYSTEM;Password=loongnix;Database=app",
"SqliteConnection": "Data Source=app.db;"
"SqliteConnection": "Data Source=./app.db;"
},
"EmailSettings": {
"Host": "smtp.qq.com",

View File

@ -28,7 +28,9 @@ onMounted(()=>{
const mainLayoutStore = useMainLayoutStore()
const connection = new HubConnectionBuilder()
.withUrl(`${useRuntimeConfig().public.baseUrl}/TerminalHub`)
.withUrl(`${useRuntimeConfig().public.baseUrl}/TerminalHub`,{
accessTokenFactory:()=> `${useCookie('token').value}`
})
.withAutomaticReconnect()
.build();
onMounted(async () => {