Add history inserts, add controllers

This commit is contained in:
Jonathan Jenne
2023-11-02 16:30:57 +01:00
parent 3f4f4681b5
commit 47d02aefee
14 changed files with 428 additions and 135 deletions

View File

@@ -1,8 +1,4 @@
using EnvelopeGenerator.Web.Handler;
using EnvelopeGenerator.Web.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
var builder = WebApplication.CreateBuilder(args);
@@ -38,13 +34,8 @@ app.UseStaticFiles();
// Add a router
app.UseRouting();
// Add file download endpoint
FileHandler handler = new();
app.MapGet("/api/document/{envelopeKey}", handler.HandleGetDocument);
app.MapPost("/api/document/{envelopeKey}", handler.HandlePostDocument);
app.MapGet("/api/envelope/{envelopeKey}", handler.HandleGetEnvelope);
app.MapPost("/api/envelope/{envelopeKey}", handler.HandlePostEnvelope);
// Add controller routes
app.MapControllers();
// Blazor plumbing
app.MapBlazorHub();