
- 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
25 lines
567 B
JavaScript
25 lines
567 B
JavaScript
const createConnection = (connection) => {
|
|
const connectionData = {
|
|
id: connection.id,
|
|
key: connection.key,
|
|
appAuthClientId: connection.appAuthClientId,
|
|
formattedData: connection.formattedData,
|
|
verified: connection.verified || false,
|
|
createdAt: connection.createdAt.getTime(),
|
|
updatedAt: connection.updatedAt.getTime(),
|
|
};
|
|
|
|
return {
|
|
data: connectionData,
|
|
meta: {
|
|
count: 1,
|
|
currentPage: null,
|
|
isArray: false,
|
|
totalPages: null,
|
|
type: 'Connection',
|
|
},
|
|
};
|
|
};
|
|
|
|
export default createConnection;
|