feat: 프로필 감사 화면에 외교 이력과 안전한 문서 상세 연결
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { purifyDiplomacyHtml } from '../../security/diplomacyHtml.js';
|
||||
import { TRPCError } from '@trpc/server';
|
||||
import { z } from 'zod';
|
||||
import { hashAuditDiplomacyDocument, type GamePrisma } from '@sammo-ts/infra';
|
||||
@@ -204,6 +205,8 @@ export const diplomacyEvent = auditProcedure.input(z.object({ id: zId }).strict(
|
||||
id: document.id,
|
||||
brief: document.textBrief,
|
||||
detail: document.textDetail,
|
||||
briefHtml: purifyDiplomacyHtml(document.textBrief),
|
||||
detailHtml: purifyDiplomacyHtml(document.textDetail),
|
||||
writtenAt: document.date,
|
||||
}
|
||||
: null,
|
||||
|
||||
@@ -2255,7 +2255,7 @@ integration('game API security over HTTP transport', () => {
|
||||
srcSignerId: generalId,
|
||||
state: 'CANCELLED',
|
||||
textBrief: '당시 외교 문서',
|
||||
textDetail: '<p>역사 본문</p>',
|
||||
textDetail: '<p>역사 본문</p><script>window.auditInjected=true</script>',
|
||||
},
|
||||
});
|
||||
await db.playAuditDiplomacyEvent.createMany({
|
||||
@@ -2338,7 +2338,10 @@ integration('game API security over HTTP transport', () => {
|
||||
after: { state: 'ACTIVATED' },
|
||||
inputSequence: '9007199254740993',
|
||||
documentStatus: 'AVAILABLE',
|
||||
document: { detail: '<p>역사 본문</p>' },
|
||||
document: {
|
||||
detail: '<p>역사 본문</p><script>window.auditInjected=true</script>',
|
||||
detailHtml: '<p>역사 본문</p>',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user