From b132d9dc3912d9bf2389f67dd64c07b6c0d3278a Mon Sep 17 00:00:00 2001 From: Zafei-Erin <897659752@qq.com> Date: Fri, 1 Mar 2024 13:17:00 +0800 Subject: [PATCH] fix: backend user fetch offers --- backend/src/router/user/getOffered.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/router/user/getOffered.ts b/backend/src/router/user/getOffered.ts index cc35c9a..5f61142 100644 --- a/backend/src/router/user/getOffered.ts +++ b/backend/src/router/user/getOffered.ts @@ -18,6 +18,10 @@ export const getOffered = async ( nft: true, }, }); + + if (offers === null) { + res.status(200).json([]); + } res.status(200).json(offers); } catch (error) { next(error);