error while inserting the data in the dynamic table
Hi, I am trying to insert the data which is coming from the form into the table, so, I am using this
but I am getting an error that
but I am getting an error that
const tableName = data.tableName
await db.insert(tableName).values()
res.status(201).json({
status: "success",
message: "Data inserted successfully",
});Argument of type 'string' is not assignable to parameter of type 'PgTable<TableConfig>'.ts(2345)data.tableNamesql