From a95ef4e3f32efbc04a37607de70d8178983edf8a Mon Sep 17 00:00:00 2001 From: vidvidvid Date: Wed, 26 Jan 2022 08:30:00 +0100 Subject: [PATCH] chore: add createQuest changes --- .../actions/quests/createQuest/createQuest.ts | 11 +++++++++++ schema.graphql | 4 ---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/handlers/actions/quests/createQuest/createQuest.ts b/packages/backend/src/handlers/actions/quests/createQuest/createQuest.ts index 54d168de..dc40a663 100644 --- a/packages/backend/src/handlers/actions/quests/createQuest/createQuest.ts +++ b/packages/backend/src/handlers/actions/quests/createQuest/createQuest.ts @@ -35,12 +35,23 @@ export async function createQuest( throw new Error('Player not allowed to create quests'); } +<<<<<<< develop const { skillsId, ...questValues } = quest; +======= + const { skills_id: skillsId, roles_id: rolesId, ...questValues } = quest; +>>>>>>> chore: add createQuest changes const questInput: Quest_Insert_Input = { ...questValues, repetition: questRepetition, +<<<<<<< develop createdByPlayerId: playerId, +======= + created_by_player_id: playerId, + quest_roles: { + data: rolesId.map((r, i) => ({ role: r, rank: i + 1 })), + }, +>>>>>>> chore: add createQuest changes quest_skills: { data: skillsId.map((s) => ({ skillId: s })), }, diff --git a/schema.graphql b/schema.graphql index 70fd7a02..5b59e963 100644 --- a/schema.graphql +++ b/schema.graphql @@ -6037,9 +6037,6 @@ input PlayerRole_set_input { update columns of table "PlayerRole" """ enum PlayerRole_update_column { -<<<<<<< develop - """column name""" -======= """ column name """ @@ -6048,7 +6045,6 @@ enum PlayerRole_update_column { """ column name """ ->>>>>>> fix: update schema description """column name"""