Provide real user and posts data for the thinking

This commit is contained in:
2025-10-25 17:58:58 +08:00
parent 40325c6df5
commit 93f7dfd379
17 changed files with 898 additions and 72 deletions

View File

@@ -1,5 +1,6 @@
using DysonNetwork.Shared.Auth;
using DysonNetwork.Shared.Http;
using DysonNetwork.Sphere.Post;
using DysonNetwork.Sphere.Publisher;
namespace DysonNetwork.Sphere.Startup;
@@ -20,6 +21,7 @@ public static class ApplicationConfiguration
app.MapControllers();
// Map gRPC services
app.MapGrpcService<PostServiceGrpc>();
app.MapGrpcService<PublisherServiceGrpc>();
return app;

View File

@@ -24,7 +24,7 @@ public class PaymentOrderAwardMeta
[JsonPropertyName("account_id")] public Guid AccountId { get; set; }
[JsonPropertyName("post_id")] public Guid PostId { get; set; }
[JsonPropertyName("amount")] public string Amount { get; set; } = null!;
[JsonPropertyName("attitude")] public PostReactionAttitude Attitude { get; set; }
[JsonPropertyName("attitude")] public Shared.Models.PostReactionAttitude Attitude { get; set; }
[JsonPropertyName("message")] public string? Message { get; set; }
}
@@ -82,7 +82,7 @@ public class BroadcastEventHandler(
logger.LogInformation("Handling post award order: {OrderId}", evt.OrderId);
await using var scope = serviceProvider.CreateAsyncScope();
var ps = scope.ServiceProvider.GetRequiredService<PostService>();
var ps = scope.ServiceProvider.GetRequiredService<Post.PostService>();
var amountNum = decimal.Parse(meta.Amount);