feat: 과거 장수 전투 결과 보존 이관 추가
preserved batres 파일을 기수 단위로 검증·체크포인트하고 과거 장수 상세에 연결한다. check-plan에는 전체 이전 항목과 정보 설명을 함께 노출한다.
This commit is contained in:
@@ -30,6 +30,15 @@ const context = (session: GameSessionTokenPayload | null, includeLegacy = false)
|
||||
$queryRaw: async (query: { strings?: readonly string[] }) => {
|
||||
if (!includeLegacy) return [];
|
||||
const sql = query.strings?.join(' ') ?? '';
|
||||
if (sql.includes('legacy_archive"."general_battle_result')) {
|
||||
return [
|
||||
{
|
||||
content: '<S>◆</>190년 1월:첫 전투\n<S>◆</>190년 2월:둘째 전투\n',
|
||||
lineCount: 2,
|
||||
contentHash: 'a'.repeat(64),
|
||||
},
|
||||
];
|
||||
}
|
||||
if (sql.includes('legacy_archive"."general')) {
|
||||
return [
|
||||
{
|
||||
@@ -385,6 +394,13 @@ describe('archive.myPastPlays', () => {
|
||||
logs: expect.objectContaining({
|
||||
generalHistory: { available: true, entries: [{ id: 1, text: '이전 서버 열전' }] },
|
||||
battleDetail: { available: false, entries: [] },
|
||||
battleResult: {
|
||||
available: true,
|
||||
entries: [
|
||||
{ id: 2, text: '<S>◆</>190년 2월:둘째 전투' },
|
||||
{ id: 1, text: '<S>◆</>190년 1월:첫 전투' },
|
||||
],
|
||||
},
|
||||
}),
|
||||
});
|
||||
expect(JSON.stringify(detail)).not.toContain('raw_data');
|
||||
|
||||
Reference in New Issue
Block a user