fix: restore legacy gameplay messages and record details

This commit is contained in:
2026-08-04 13:30:51 +00:00
parent 8b8a285bc7
commit c4c4ee6e0f
12 changed files with 147 additions and 31 deletions
+4 -4
View File
@@ -24,13 +24,13 @@ const auth: GameSessionTokenPayload = {
type LogQuery = {
where: {
scope: LogScope;
category: LogCategory;
category: LogCategory | { in: LogCategory[] };
generalId?: number;
id: { gte: number };
};
orderBy: { id: 'desc' };
take: number;
select: { id: true; text: true };
select: { id: true; text: true; createdAt: true };
};
const buildContext = (findMany: (query: LogQuery) => Promise<Array<{ id: number; text: string }>>) =>
@@ -56,7 +56,7 @@ describe('general.getRecentRecords', () => {
{ id: 20, text: '개인 cursor' },
];
}
if (query.where.category === LogCategory.SUMMARY) {
if (typeof query.where.category === 'object' && query.where.category.in.includes(LogCategory.SUMMARY)) {
return [
{ id: 32, text: '장수 최신' },
{ id: 20, text: '장수 cursor' },
@@ -89,7 +89,7 @@ describe('general.getRecentRecords', () => {
},
orderBy: { id: 'desc' },
take: 16,
select: { id: true, text: true },
select: { id: true, text: true, createdAt: true },
});
});