2
0
Files
bot/packages/forge/blocks/nocodb/helpers/parseSearchParams.ts
Abdullah bin Amir a17781dfa6 Add NocoDB block (#1365)
#970 #997

Fully integrate NocoDB.

Added all API Functions:

- List Table Records
- Create Table Records
- Update Table Records
- Delete Table Records
- Read Table Record
- Count Table Records
- List Linked Records
- Link Records
- Unlink Records

Optional Todo:
- Save responses of non-get requests in a variable (error validation
try-catch is added and logged so i do not think so it is much needed)

You are free to implement any extra validation/function :D

---------

Co-authored-by: Baptiste Arnaud <baptiste.arnaud95@gmail.com>
2024-05-27 10:46:42 +02:00

9 lines
278 B
TypeScript

export const parseSearchParams = (
records: Record<string, any>
): Record<string, string> => {
return Object.entries(records).reduce((acc, [key, value]) => {
if (value === null || value === undefined) return acc
return { ...acc, [key]: value.toString() }
}, {})
}