Fix auth flows and add daemon heartbeat endpoint
This commit is contained in:
@@ -26,7 +26,16 @@ export default async function nodeRoutes(app: FastifyInstance) {
|
||||
.where(eq(nodes.organizationId, orgId))
|
||||
.orderBy(nodes.createdAt);
|
||||
|
||||
return { data: nodeList };
|
||||
const total = nodeList.length;
|
||||
return {
|
||||
data: nodeList,
|
||||
meta: {
|
||||
total,
|
||||
page: 1,
|
||||
perPage: total,
|
||||
totalPages: total === 0 ? 0 : 1,
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
// POST /api/organizations/:orgId/nodes
|
||||
|
||||
Reference in New Issue
Block a user