Skip to content
Snippets Groups Projects
Commit ac5af842 authored by BigDude's avatar BigDude
Browse files

Merge branch 'main' of https://gitlab.au.dk/bad1/assignment2

parents a4dc5f82 72c042f2
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ namespace assignment2.Controllers
private readonly ILogService _logsService;
public LogController(ILogService logsService) => _logsService = logsService;
//[Authorize(Roles = "Admin")]
[HttpGet]
public async Task<IActionResult> GetAsync(string? user, string? operation, DateTime? startDate, DateTime? endTime)
{
......
using MongoDB.Bson;
using MongoDB.Bson.Serialization.Attributes;
namespace assignment1.Models
namespace assignment2.Models
{
[BsonIgnoreExtraElements]
public class LogEntry
......@@ -11,6 +11,9 @@ namespace assignment1.Models
[BsonElement("Level")]
public int Level { get; set; }
[BsonElement("UtcTimeStamp")]
public DateTime UtcTimeStamp { get; set; }
[BsonElement("Properties")]
public required LogProperties Properties { get; set; }
......
......@@ -4,7 +4,7 @@ using System.Linq;
using System.Threading.Tasks;
using MongoDB.Bson.Serialization.Attributes;
namespace assignment1.Models
namespace assignment2.Models
{
public class LogInfo
{
......
using MongoDB.Bson.Serialization.Attributes;
namespace assignment1.Models
namespace assignment2.Models
{
[BsonIgnoreExtraElements]
public class LogProperties
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment