Files
automatisch/packages/backend/test/mocks/rest/api/v1/apps/get-connections.js
Ali BARIN 2a77763c51 feat(AppConfig): iterate how apps are managed
- auth clients are always shared, cannot be disabled
- custom connections are enabled by default, can be disabled
- any existing connections can be reconnected regardless of its AppConfig or AppAuthClient states
2024-12-12 10:12:50 +00:00

25 lines
630 B
JavaScript

const getConnectionsMock = (connections) => {
return {
data: connections.map((connection) => ({
id: connection.id,
key: connection.key,
verified: connection.verified,
appAuthClientId: connection.appAuthClientId,
formattedData: {
screenName: connection.formattedData.screenName,
},
createdAt: connection.createdAt.getTime(),
updatedAt: connection.updatedAt.getTime(),
})),
meta: {
count: connections.length,
currentPage: null,
isArray: true,
totalPages: null,
type: 'Connection',
},
};
};
export default getConnectionsMock;