21 lines
698 B
C#
21 lines
698 B
C#
using e_suite.Database.Audit;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace eSuite.API.Utilities;
|
|
|
|
/// <summary>
|
|
/// Base to use when adding a controller to the API
|
|
/// </summary>
|
|
public abstract class ESuiteControllerBase : ControllerBase
|
|
{
|
|
/// <summary>
|
|
/// Contains the details of the currently logged in user. This should be passed on to the audit module to make audit tracking easy.
|
|
/// </summary>
|
|
/// <remarks>Set the comment property to include the comment into the audit log</remarks>
|
|
protected AuditUserDetails AuditUserDetails =>
|
|
new()
|
|
{
|
|
UserId = User.Id(),
|
|
UserDisplayName = User.DisplayName()
|
|
};
|
|
} |