feat: write REST API endpoint to create connection

This commit is contained in:
Ali BARIN
2024-09-09 14:59:45 +00:00
committed by Faruk AYDIN
parent e812725182
commit 7394aca02d
7 changed files with 511 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
const createConnection = (connection) => {
const connectionData = {
id: connection.id,
key: connection.key,
reconnectable: connection.reconnectable || true,
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;