🐛 Bug fixes
This commit is contained in:
@@ -2,11 +2,11 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
using DysonNetwork.Shared.Data;
|
||||
using DysonNetwork.Shared.Proto;
|
||||
using DysonNetwork.Sphere.Post;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using NodaTime;
|
||||
using VerificationMark = DysonNetwork.Shared.Data.VerificationMark;
|
||||
using Account = DysonNetwork.Pass.Account.Account;
|
||||
|
||||
namespace DysonNetwork.Sphere.Publisher;
|
||||
|
||||
|
@@ -34,7 +34,7 @@ public class PublisherController(
|
||||
var account = await accounts.GetAccountAsync(
|
||||
new GetAccountRequest { Id = publisher.AccountId.Value.ToString() }
|
||||
);
|
||||
publisher.Account = account;
|
||||
publisher.Account = Pass.Account.Account.FromProtoValue(account);
|
||||
|
||||
return Ok(publisher);
|
||||
}
|
||||
|
@@ -163,8 +163,12 @@ public class PublisherService(
|
||||
Name = name ?? account.Name,
|
||||
Nick = nick ?? account.Nick,
|
||||
Bio = bio ?? account.Profile.Bio,
|
||||
Picture = picture ?? CloudFileReferenceObject.FromProtoValue(account.Profile.Picture),
|
||||
Background = background ?? CloudFileReferenceObject.FromProtoValue(account.Profile.Background),
|
||||
Picture = picture ?? (account.Profile.Picture is null
|
||||
? null
|
||||
: CloudFileReferenceObject.FromProtoValue(account.Profile.Picture)),
|
||||
Background = background ?? (account.Profile.Background is null
|
||||
? null
|
||||
: CloudFileReferenceObject.FromProtoValue(account.Profile.Background)),
|
||||
AccountId = Guid.Parse(account.Id),
|
||||
Members = new List<PublisherMember>
|
||||
{
|
||||
@@ -191,6 +195,7 @@ public class PublisherService(
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (publisher.Background is not null)
|
||||
{
|
||||
await fileRefs.CreateReferenceAsync(
|
||||
@@ -250,6 +255,7 @@ public class PublisherService(
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if (publisher.Background is not null)
|
||||
{
|
||||
await fileRefs.CreateReferenceAsync(
|
||||
|
Reference in New Issue
Block a user