Category : api

Boa tarde. Escrevi o model da tabela do MYSQL em questão, que possui essa coluna "avg_ratings", exatamente como está escrito, porém o Sequelize acusa erro dizendo que a coluna não é contada na lista de campos. Adicionei um log que me retorna o SELECT gerado, e segue abaixo o mesmo: SELECT […outros campos] `ratings_votes` AS ..

Read more

i want to call an api and then store its data to mongodb for seeding . Am a new here so help me plz . here is the code econst fetch = require(‘node-fetch’) var PushFood = require(‘./data/pushFoodJson’) // יבוא של PushFood request = require(‘request’); var Food = require(‘./models/food’) // יבוא מודל של המשתמש var MongoClient ..

Read more

I am building an app, the rest countries api challenge from frontendmentor – https://www.frontendmentor.io/challenges/rest-countries-api-with-color-theme-switcher-5cacc469fec04111f7b848ca and I have run into a problem. When trying to find the border countries full name using the alpha3code, I get the error TypeError: Cannot read property ‘name’ of undefined. import React, { useState, useEffect } from "react"; import axios from ..

Read more

Currently I am using window.getSelection() to receive user highlighted text but this seams to work only on something like simple as this: <span>Lorem Ipsum dolar sit amet</span>, but fails on <span>Lorem Ipsum <span style="font-weight:600">dolar sit</span> amet</span> when Ipsum dolar is highlighted. How can I get the highlighted text when it spans over multiple elements? Source: ..

Read more

Let’s say I have a module with 2 Promises under single module(function) like this: exports.get_info = async(req, res) => { const first_post_call = await axios.post(url, data_to_be_submitted) token = first_post_call.data.token const second_post_call await.post(url, token) console.log(second_post_call.data) } Above mostly is not working in my case(strangely). But when I split them into 2 modules with same exact code ..

Read more