From 4c5df72057fe02257e243de37930a47425a84722 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Wed, 19 Feb 2025 02:05:39 +0800 Subject: chore(docker): remove crupest-api, forgejo and move dropped. --- .../TodosWebApplicationExtensions.cs | 32 ---------------------- 1 file changed, 32 deletions(-) delete mode 100644 dropped/docker/crupest-api/CrupestApi/CrupestApi.Todos/TodosWebApplicationExtensions.cs (limited to 'dropped/docker/crupest-api/CrupestApi/CrupestApi.Todos/TodosWebApplicationExtensions.cs') diff --git a/dropped/docker/crupest-api/CrupestApi/CrupestApi.Todos/TodosWebApplicationExtensions.cs b/dropped/docker/crupest-api/CrupestApi/CrupestApi.Todos/TodosWebApplicationExtensions.cs deleted file mode 100644 index 0ff05a0..0000000 --- a/dropped/docker/crupest-api/CrupestApi/CrupestApi.Todos/TodosWebApplicationExtensions.cs +++ /dev/null @@ -1,32 +0,0 @@ -using CrupestApi.Commons; - -namespace CrupestApi.Todos; - -public static class TodosWebApplicationExtensions -{ - public static WebApplication MapTodos(this WebApplication app, string path) - { - if (app is null) - { - throw new ArgumentNullException(nameof(app)); - } - - app.MapGet(path, async (context) => - { - var todosService = context.RequestServices.GetRequiredService(); - - try - { - var todos = await todosService.GetTodosAsync(); - await context.Response.WriteJsonAsync(todos); - - } - catch (Exception e) - { - await context.Response.WriteMessageAsync(e.Message, statusCode: StatusCodes.Status503ServiceUnavailable); - } - }); - - return app; - } -} \ No newline at end of file -- cgit v1.2.3