Fix get available tables (#4873)

Endpoint is broken since we now use `Remote` as a suffix for remote
table names.

This PR:
- creates a common function to calculate the name of the remote table
- use it in the `findAvailableRemotePostgresTables` to know if a table
has been synced or not

Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
Thomas Trompette
2024-04-08 11:11:24 +02:00
committed by GitHub
parent 3eef4a8938
commit 2890a7a44a
3 changed files with 13 additions and 3 deletions

View File

@ -0,0 +1,4 @@
import { camelCase } from 'src/utils/camel-case';
export const getRemoteTableName = (distantTableName: string) =>
`${camelCase(distantTableName)}Remote`;