From 8c952a57f5f172805b11e773d1ce8446d33325d3 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 30 Dec 2022 05:18:14 -0800 Subject: [PATCH] Condense createParty into one method call --- components/Party/index.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/Party/index.tsx b/components/Party/index.tsx index 05fb6547..35c8499f 100644 --- a/components/Party/index.tsx +++ b/components/Party/index.tsx @@ -41,13 +41,11 @@ const Party = (props: Props) => { // Methods: Creating a new party async function createParty(extra: boolean = false) { - let body = { + return await api.endpoints.parties.create({ party: { extra: extra, }, - } - - return await api.endpoints.parties.create(body) + }) } // Methods: Updating the party's details