Rename Web Project

This commit is contained in:
Jonathan Jenne
2023-11-08 08:59:03 +01:00
parent 9245448d1c
commit d0a4249eb7
781 changed files with 14192 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
using DigitalData.Modules.Logging;
using EnvelopeGenerator.Web.Services;
using Microsoft.AspNetCore.Mvc;
using static EnvelopeGenerator.Web.Constants;
namespace EnvelopeGenerator.Web.Controllers
{
public class BaseController : Controller
{
internal DatabaseService database;
internal LogConfig logConfig;
internal Logger logger;
public BaseController(DatabaseService database, LoggingService logging)
{
this.database = database;
this.logConfig = logging.LogConfig;
this.logger = logging.LogConfig.GetLoggerFor(GetType().Name);
}
internal ObjectResult ErrorResponse(Exception e)
{
logger.Error(e);
return Problem(
statusCode: 500,
detail: e.Message,
type: ErrorType.ServerError.ToString());
}
}
}