top of page
Total:
0000.00 AED
Included:
Optional:
0000.00 AED
0000.00 AED
Select Your Website Type

PORTFOLIO

WEBSITE

E-COMMERCE

WEBSITE

//Function : Get my To-Do List from Monday.com export function post_list(request) { console.log("Get List Function Called - ", request); const options = { headers: { 'Content-Type': 'application/json' } }; // Ensure the request body is parsed correctly let requestBody = request.body; if (typeof requestBody === 'string') { try { requestBody = JSON.parse(requestBody); } catch (e) { console.error('Failed to parse request body:', e); options.body = { success: false, error: 'Failed to parse request body' }; return serverError(options); } } console.log("Parsed Request Body = ", requestBody); const { startDate, endDate } = requestBody; if (!startDate || !endDate) { options.body = { success: false, error: 'Invalid date range' }; return serverError(options); } try { return wixSecretsBackend.getSecret("monday-key") .then((secret) => { let ops = { method: 'POST', headers: { 'Content-Type': 'application/json', 'API-Version': '2024-04', Authorization: secret }, body: JSON.stringify({ query: `{ boards(ids: 1356814376) { columns (ids: ["status", "status5"]) { id title settings_str } items_page( limit: 2, query_params: { rules: [ { column_id: "date_1", compare_value: ["${startDate}", "${endDate}"], operator: between } ] } ) { items { id name column_values (ids: ["date_1", "date4", "status", "status5"]) { id value } } } } }` }) }; return wixFetch.fetch('https://api.monday.com/v2', ops) .then(res => res.json()) .then(json => { options.body = { success: true, payload: json }; return ok(options); }) .catch(err => { console.error('Fetch error:', err); options.body = { success: false, error: err }; return serverError(options); }); }) .catch(err => { console.error('Secrets error:', err); options.body = { success: false, error: err }; return serverError(options); }); } catch (error) { console.error('Unexpected error:', error); options.body = { success: false, error: error }; return serverError(options); } }

Included Features:
Component
Total:
0000.00 AED
Included:
Optional:
0000.00 AED
0000.00 AED
Included Features
Optional Features:
No Optional Components
Component

000.00 AED

Optional Features
bottom of page