mirror of
https://github.com/versia-pub/server.git
synced 2025-12-08 01:08:19 +01:00
fix(federation): 🐛 Fix objects endpoint not returning correctly formatted element
This commit is contained in:
parent
534a6136c1
commit
ce082f8e6a
|
|
@ -45,9 +45,9 @@ export default apiRoute(async (req, matchedRoute) => {
|
||||||
apiObject = foundObject ? likeToLysand(foundObject) : null;
|
apiObject = foundObject ? likeToLysand(foundObject) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!foundObject) {
|
if (!foundObject || !apiObject) {
|
||||||
return errorResponse("Object not found", 404);
|
return errorResponse("Object not found", 404);
|
||||||
}
|
}
|
||||||
|
|
||||||
return jsonResponse(foundObject);
|
return jsonResponse(apiObject);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue