feat: 장수 관련 명령어 처리 및 설정 기능 추가
This commit is contained in:
@@ -249,6 +249,7 @@ export const createDatabaseTurnHooks = async (
|
||||
nations,
|
||||
troops,
|
||||
deletedTroops,
|
||||
deletedGenerals,
|
||||
diplomacy,
|
||||
logs,
|
||||
createdGenerals,
|
||||
@@ -300,6 +301,12 @@ export const createDatabaseTurnHooks = async (
|
||||
});
|
||||
}
|
||||
|
||||
if (deletedGenerals.length > 0) {
|
||||
await prisma.general.deleteMany({
|
||||
where: { id: { in: deletedGenerals } },
|
||||
});
|
||||
}
|
||||
|
||||
await Promise.all([
|
||||
...generals
|
||||
.filter((general) => !createdIds.has(general.id))
|
||||
|
||||
Reference in New Issue
Block a user