Новый адрес API и обновил библиотеки.
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 12s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 12s
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using Microsoft.AspNetCore.Http.HttpResults;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Strela.Models;
|
||||
using Strela.Services;
|
||||
@@ -46,7 +45,7 @@ public class DeviceController : ControllerBase
|
||||
return Ok(d);
|
||||
//else return NoContent();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//========================= POST ====================================//
|
||||
@@ -62,12 +61,12 @@ public class DeviceController : ControllerBase
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
//========================= DELETE ====================================//
|
||||
#region DELETE
|
||||
|
||||
|
||||
[HttpDelete("DelDevice")]
|
||||
public IActionResult DelDevice(Guid id) //Удалить устройство по id
|
||||
{
|
||||
@@ -78,6 +77,6 @@ public class DeviceController : ControllerBase
|
||||
db.SaveChanges();
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class ObjectController : ControllerBase
|
||||
using (var db = new SQLiteService())
|
||||
{
|
||||
var oi = db.ObjectItems.ToList();
|
||||
return Ok(oi);
|
||||
return Ok(oi);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using Microsoft.AspNetCore.Http.HttpResults;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Strela.Models;
|
||||
using Strela.Services;
|
||||
@@ -42,7 +41,7 @@ public class TypeController : ControllerBase
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
//========================= POST ====================================//
|
||||
@@ -72,6 +71,6 @@ public class TypeController : ControllerBase
|
||||
db.SaveChanges();
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ using Strela.Models;
|
||||
|
||||
namespace Strela.Services
|
||||
{
|
||||
public class SQLiteService: DbContext
|
||||
public class SQLiteService : DbContext
|
||||
{
|
||||
public SQLiteService() => Database.EnsureCreated();
|
||||
public virtual DbSet<User> Users { get; set; }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>a4a5f63c-2231-4614-977a-c009c38846a3</UserSecretsId>
|
||||
@@ -16,15 +16,15 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.16" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.16" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.16">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.10">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.22.1" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.23.0" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.3" />
|
||||
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.16.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
"Default": "Error",
|
||||
"Microsoft.AspNetCore": "Error",
|
||||
"Microsoft.AspNetCore.Hosting.Diagnostics": "Information"
|
||||
}
|
||||
},
|
||||
"Urls": "http://0.0.0.0:5050",
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"dotnet-ef": {
|
||||
"version": "10.0.10",
|
||||
"commands": [
|
||||
"dotnet-ef"
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user