merge: 설문 게시자 장수명 수정을 main에 반영한다

This commit is contained in:
2026-08-24 08:04:28 +00:00
2 changed files with 5 additions and 5 deletions
+1 -2
View File
@@ -416,7 +416,6 @@ export const voteRouter = router({
) )
.mutation(async ({ ctx, input }) => { .mutation(async ({ ctx, input }) => {
const general = await getMyGeneral(ctx); const general = await getMyGeneral(ctx);
const openerName = ctx.auth?.user.username ?? general.name;
const options = normalizeOptions(input.options); const options = normalizeOptions(input.options);
if (options.length === 0) { if (options.length === 0) {
throw new TRPCError({ code: 'BAD_REQUEST', message: '항목이 없습니다.' }); throw new TRPCError({ code: 'BAD_REQUEST', message: '항목이 없습니다.' });
@@ -468,7 +467,7 @@ export const voteRouter = router({
${multipleOptions}, ${multipleOptions},
${input.revealMode}, ${input.revealMode},
${general.id}, ${general.id},
${openerName}, ${general.name},
${gameTime.now}, ${gameTime.now},
${gameTime.tick === null ? null : BigInt(gameTime.tick)}, ${gameTime.tick === null ? null : BigInt(gameTime.tick)},
${endAt}, ${endAt},
+4 -3
View File
@@ -264,7 +264,7 @@ describe('vote router actor and permission boundaries', () => {
expect(fixture.redisPublish).not.toHaveBeenCalled(); expect(fixture.redisPublish).not.toHaveBeenCalled();
}); });
it('publishes a global front-status projection after creating a survey', async () => { it('stores the authenticated general name and publishes a global projection after creating a survey', async () => {
const auth = buildAuth(['admin.survey.open']); const auth = buildAuth(['admin.survey.open']);
auth.user.username = 'admin-account'; auth.user.username = 'admin-account';
auth.user.displayName = '관리자 표시명'; auth.user.displayName = '관리자 표시명';
@@ -285,8 +285,9 @@ describe('vote router actor and permission boundaries', () => {
const insert = fixture.queryRaw.mock.calls const insert = fixture.queryRaw.mock.calls
.map(([query]) => query) .map(([query]) => query)
.find((query) => sqlText(query).includes('INSERT INTO vote_poll')); .find((query) => sqlText(query).includes('INSERT INTO vote_poll'));
expect(insert?.values).toContain('admin-account'); expect(insert?.values).toContain('관리자 장수');
expect(insert?.values).not.toContain('관리자 장수'); expect(insert?.values).not.toContain('admin-account');
expect(insert?.values).not.toContain('관리자 표시명');
}); });
it('reports the current world develcost as the legacy five-times survey reward', async () => { it('reports the current world develcost as the legacy five-times survey reward', async () => {