fix(federation): 🐛 Fix objects endpoint not returning correctly formatted element

This commit is contained in:
Jesse Wierzbinski 2024-04-17 12:47:26 -10:00
parent 534a6136c1
commit ce082f8e6a
No known key found for this signature in database

View file

@ -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);
});