Fix Notes and remove Dupe type
This commit is contained in:
@@ -23,6 +23,9 @@ public class NoteController(
|
||||
NoteActionData body,
|
||||
string sessionId)
|
||||
{
|
||||
Note newNote = new Note { Time = body.Note.Time, Text = body.Note.Text };
|
||||
pmcData.Notes.DataNotes.Add(newNote);
|
||||
|
||||
return _eventOutputHolder.GetOutput(sessionId);
|
||||
}
|
||||
|
||||
@@ -38,6 +41,10 @@ public class NoteController(
|
||||
NoteActionData body,
|
||||
string sessionId)
|
||||
{
|
||||
Note noteToEdit = pmcData.Notes.DataNotes[body.Index!.Value];
|
||||
noteToEdit.Time = body.Note.Time;
|
||||
noteToEdit.Text = body.Note.Text;
|
||||
|
||||
return _eventOutputHolder.GetOutput(sessionId);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Core.Models.Eft.ItemEvent;
|
||||
using Core.Models.Eft.Notes;
|
||||
using Core.Models.Eft.Ragfair;
|
||||
using Core.Models.Enums;
|
||||
using Core.Utils.Json;
|
||||
@@ -780,9 +781,3 @@ public record Bonus
|
||||
[JsonPropertyName("skillType")]
|
||||
public BonusSkillType? SkillType { get; set; }
|
||||
}
|
||||
|
||||
public record Note
|
||||
{
|
||||
public double? Time { get; set; }
|
||||
public string? Text { get; set; }
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ public record NoteActionData : BaseInteractionRequestData
|
||||
public record Note
|
||||
{
|
||||
[JsonPropertyName("Time")]
|
||||
public long? Time { get; set; }
|
||||
public double? Time { get; set; }
|
||||
|
||||
[JsonPropertyName("Text")]
|
||||
public string? Text { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user