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