🐛 Fixes some bugs
This commit is contained in:
parent
61f7764510
commit
b1e3f91acd
@ -1,6 +1,5 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using DysonNetwork.Sphere.Auth;
|
||||
using DysonNetwork.Sphere.Post;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
@ -125,7 +125,8 @@ public class PostController(
|
||||
var postsId = posts.Select(e => e.Id).ToList();
|
||||
var reactionMaps = await ps.GetPostReactionMapBatch(postsId);
|
||||
foreach (var post in posts)
|
||||
post.ReactionsCount = reactionMaps[post.Id];
|
||||
post.ReactionsCount =
|
||||
reactionMaps.TryGetValue(post.Id, out var count) ? count : new Dictionary<string, int>();
|
||||
|
||||
Response.Headers["X-Total"] = totalCount.ToString();
|
||||
|
||||
|
11
compose.yaml
11
compose.yaml
@ -1,6 +1,7 @@
|
||||
services:
|
||||
dysonnetwork.sphere:
|
||||
image: dysonnetwork.sphere
|
||||
build:
|
||||
context: .
|
||||
dockerfile: DysonNetwork.Sphere/Dockerfile
|
||||
sphere:
|
||||
image: xsheep2010/dyson-sphere:latest
|
||||
ports:
|
||||
- "8001:8080"
|
||||
volumes:
|
||||
- "./keys:/app/keys"
|
||||
|
Loading…
x
Reference in New Issue
Block a user