diff --git a/server/handlers/walletHandler/index.js b/server/handlers/walletHandler/index.js index 443a4b48..e2b3faf6 100644 --- a/server/handlers/walletHandler/index.js +++ b/server/handlers/walletHandler/index.js @@ -111,10 +111,11 @@ const walletPatch = async (req, res) => { abortEarly: false, }); - const { id, about, logo_url, cover_url } = validatedBody; + const { wallet_id } = req; + const { about, logo_url, cover_url } = validatedBody; const walletService = new WalletService(); const returnedWallet = await walletService.updateWallet( - id, + wallet_id, about, logo_url, cover_url, @@ -188,4 +189,4 @@ module.exports = { walletSingleGet, walletBatchCreate, walletBatchTransfer, -}; +}; \ No newline at end of file diff --git a/server/handlers/walletHandler/schemas.js b/server/handlers/walletHandler/schemas.js index 21d63d8b..1ad27383 100644 --- a/server/handlers/walletHandler/schemas.js +++ b/server/handlers/walletHandler/schemas.js @@ -50,8 +50,6 @@ const walletPostSchema = Joi.object({ }); const walletPatchSchema = Joi.object({ - id: Joi.string().uuid().required(), - name: Joi.string().required(), logo_url: Joi.string(), cover_url: Joi.string(), about: Joi.string(),