From ce082f8e6a9caf49da899421251c252e0d70a7e0 Mon Sep 17 00:00:00 2001 From: Jesse Wierzbinski Date: Wed, 17 Apr 2024 12:47:26 -1000 Subject: [PATCH] fix(federation): :bug: Fix objects endpoint not returning correctly formatted element --- server/api/objects/[uuid]/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/api/objects/[uuid]/index.ts b/server/api/objects/[uuid]/index.ts index 46580aec..c9dc711c 100644 --- a/server/api/objects/[uuid]/index.ts +++ b/server/api/objects/[uuid]/index.ts @@ -45,9 +45,9 @@ export default apiRoute(async (req, matchedRoute) => { apiObject = foundObject ? likeToLysand(foundObject) : null; } - if (!foundObject) { + if (!foundObject || !apiObject) { return errorResponse("Object not found", 404); } - return jsonResponse(foundObject); + return jsonResponse(apiObject); });