♻️ Remove the Sphere project depends on the Pass project. Move to the shared project instead.

This commit is contained in:
2025-09-16 00:52:37 +08:00
parent 49beb17925
commit 3caa79b9a7
12 changed files with 16 additions and 21 deletions

View File

@@ -2,7 +2,6 @@ using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json;
using System.Text.Json.Serialization;
using DysonNetwork.Pass.Account;
using DysonNetwork.Shared.Data;
using NodaTime;
@@ -64,5 +63,5 @@ public class PollAnswer : ModelBase
public Guid AccountId { get; set; }
public Guid PollId { get; set; }
[JsonIgnore] public Poll? Poll { get; set; }
[NotMapped] public Account? Account { get; set; }
[NotMapped] public AccountReference? Account { get; set; }
}

View File

@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.Text.Json;
using DysonNetwork.Shared.Data;
using DysonNetwork.Shared.Proto;
using DysonNetwork.Shared.Registry;
using Microsoft.AspNetCore.Authorization;
@@ -116,7 +117,7 @@ public class PollController(
{
var protoValue = answeredAccounts.FirstOrDefault(a => a.Id == answer.AccountId.ToString());
if (protoValue is not null)
answer.Account = Pass.Account.Account.FromProtoValue(protoValue);
answer.Account = AccountReference.FromProtoValue(protoValue);
}
}