fix note bugs
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Michele Scandura 2021-09-23 12:47:48 +01:00
parent 3d0450efff
commit 5b7ad4f2ff
3 changed files with 15 additions and 3 deletions

View File

@ -18,7 +18,7 @@ namespace Sledgemapper.Api.Handlers
{
await CheckAuthorization(command);
var jsonString = JsonSerializer.Serialize(command.Note);
var session = await SaveLog(command, "N", "W", jsonString, cancellationToken);
var session = await SaveLog(command, "N", "N", jsonString, cancellationToken);
await Mediator.Publish(new NewNoteNotification(session, command.Note, command.UserId), cancellationToken);
return true;
}

View File

@ -1,9 +1,21 @@
namespace Sledgemapper.Shared.Entities
namespace Sledgemapper.Shared.Entities
{
public class Note :BaseMapEntity
{
public Note(){}
public Note(Note n)
{
X=n.X;
Y=n.Y;
Text=n.Text;
ID = n.ID;
Rotation = n.Rotation;
Timestamp = n.Timestamp;
}
public string Text { get; set; }
}

View File

@ -255,7 +255,7 @@ namespace Sledgemapper
else
{
_sessionData.Notes.TryGetValue(_state.SelectedNote.ToString(), out var n);
_state.SelectedNote = n;
_state.SelectedNote = new Note(n);
var viewNoteButton = new TextButton
{
Text = "View Note", Width = 80, Height = 20, Padding = new Thickness(2),