feat: 턴 데몬 명령 처리 및 결과 응답 기능 추가
This commit is contained in:
@@ -248,6 +248,7 @@ export const createDatabaseTurnHooks = async (
|
||||
cities,
|
||||
nations,
|
||||
troops,
|
||||
deletedTroops,
|
||||
diplomacy,
|
||||
logs,
|
||||
createdGenerals,
|
||||
@@ -293,6 +294,11 @@ export const createDatabaseTurnHooks = async (
|
||||
data: createdDiplomacy.map(buildDiplomacyCreate),
|
||||
});
|
||||
}
|
||||
if (deletedTroops.length > 0) {
|
||||
await prisma.troop.deleteMany({
|
||||
where: { troopLeaderId: { in: deletedTroops } },
|
||||
});
|
||||
}
|
||||
|
||||
await Promise.all([
|
||||
...generals
|
||||
|
||||
Reference in New Issue
Block a user