diff --git a/Aaru.Server.Api/Aaru.Server.Api.csproj b/Aaru.Server.Api/Aaru.Server.Api.csproj deleted file mode 100644 index fbb720db..00000000 --- a/Aaru.Server.Api/Aaru.Server.Api.csproj +++ /dev/null @@ -1,11 +0,0 @@ - - - - net9.0 - enable - enable - true - - - - diff --git a/Aaru.Server.Api/Aaru.Server.Api.http b/Aaru.Server.Api/Aaru.Server.Api.http deleted file mode 100644 index e629f715..00000000 --- a/Aaru.Server.Api/Aaru.Server.Api.http +++ /dev/null @@ -1,11 +0,0 @@ -@Aaru.Server.Api_HostAddress = http://localhost:5132 - -GET {{Aaru.Server.Api_HostAddress}}/todos/ -Accept: application/json - -### - -GET {{Aaru.Server.Api_HostAddress}}/todos/1 -Accept: application/json - -### diff --git a/Aaru.Server.Api/Program.cs b/Aaru.Server.Api/Program.cs deleted file mode 100644 index a81b424a..00000000 --- a/Aaru.Server.Api/Program.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Text.Json.Serialization; - -var builder = WebApplication.CreateSlimBuilder(args); - -builder.Services.ConfigureHttpJsonOptions(options => -{ - options.SerializerOptions.TypeInfoResolverChain.Insert(0, - AppJsonSerializerContext.Default); -}); - -var app = builder.Build(); - -var sampleTodos = new Todo[] -{ - new(1, "Walk the dog"), new(2, "Do the dishes", DateOnly.FromDateTime(DateTime.Now)), - new(3, "Do the laundry", DateOnly.FromDateTime(DateTime.Now.AddDays(1))), new(4, "Clean the bathroom"), - new(5, "Clean the car", DateOnly.FromDateTime(DateTime.Now.AddDays(2))) -}; - -var todosApi = app.MapGroup("/todos"); -todosApi.MapGet("/", () => sampleTodos); - -todosApi.MapGet("/{id}", - (int id) => sampleTodos.FirstOrDefault(a => a.Id == id) is {} todo - ? Results.Ok(todo) - : Results.NotFound()); - -app.Run(); - -public record Todo(int Id, string? Title, DateOnly? DueBy = null, bool IsComplete = false); - -[JsonSerializable(typeof(Todo[]))] -internal partial class AppJsonSerializerContext : JsonSerializerContext {} \ No newline at end of file diff --git a/Aaru.Server.Api/Properties/launchSettings.json b/Aaru.Server.Api/Properties/launchSettings.json deleted file mode 100644 index 09bf38d4..00000000 --- a/Aaru.Server.Api/Properties/launchSettings.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/launchsettings.json", - "profiles": { - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "launchUrl": "todos", - "applicationUrl": "http://localhost:5132", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} diff --git a/Aaru.Server.Api/appsettings.Development.json b/Aaru.Server.Api/appsettings.Development.json deleted file mode 100644 index 0c208ae9..00000000 --- a/Aaru.Server.Api/appsettings.Development.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - } -} diff --git a/Aaru.Server.Api/appsettings.json b/Aaru.Server.Api/appsettings.json deleted file mode 100644 index 10f68b8c..00000000 --- a/Aaru.Server.Api/appsettings.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*" -} diff --git a/CICMMetadata b/CICMMetadata deleted file mode 160000 index 054310d8..00000000 --- a/CICMMetadata +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 054310d8fb6fbee85adc02bb5a2e43aa4d6adff4