pablobion / fake-news-detector

🔎 Detector de fake news
0 stars 0 forks source link

Conectar pagina do perfil com o back #20

Closed pablobion closed 3 years ago

pedrosarkis commented 3 years ago

Aqui ja deixei as funções prontas, tens só que atribuir os eventos e criar um botão chamado "limpar histórico", que eu ja crio a função tbm.

pablobion commented 3 years ago

@pedrosarkis Botão foi feito, e botão de excluir a conta tb.

me passa um exemplo de array do historico.news para eu botar pra renderizar em tela

inclusive, o histórico ja esta salvando? porque na minha conta ta vindo em branco, mas acredito que pode ser algum processo q não terminamos no detector.

Além das news o "getProfileData não deveria retornar mais coisas?" seria legal também uma contagem e noticias falsas e verdadeiras encontradas.

pablobion commented 3 years ago
pedrosarkis commented 3 years ago

O histórico já ta indo, dá um pull aí, na última atualização fiz isso, tá em um use effect, só tens que ter notícia lá cadastrada

pedrosarkis commented 3 years ago

@pablobion Conferi agora, já ta ok, se voce tiver dados no perfil, o useEffect ja vai trazer, segue exemplo da estrutura de dados que é retornada na pagina de perfil ..

{"success":true,"news":[{"_id":"5f77a9602c4c6cbb3fa4b140","verifiedBy":"pedrosarkisverani@gmail.com","content":"The event will be held online on November 30-December 6 in four regions, Europe, North America, Asia, and Oceania, and will have a combined $250,000 prizepool on offer.The European side of the competition will feature 16 teams, 12 of whom will receive direct invites while the remaining quartet will come from qualifiers. Partner teams Astralis, G2, Natus Vincere, and Complexity have already been confirmed for the tournament, which will begin with two double-elimination groups of eight, followed by a single-elimination playoffs bracket.Over in North America, Evil Geniuses and Liquid will be joined by four more invited sides and two via qualifiers in a GSL-style group stage before the tournament culminates with a single-elimination bracket.Asia and Oceania will comprise four teams each, who will take part in a double-elimination bracket. None of the participants, who will also be determined via a combination of invites and qualifiers (three to one), have been revealed in the two regions.DreamHack Masters Winter will be the last Masters-level tournament in the ESL Pro Tour awarding points towards IEM Katowice, the next Masters Championship in the prestigious circuit.The following six teams have been confirmed so far, with more to be announced shortly.","url":"https://www.hltv.org/news/30264/dreamhack-announce-masters-winter-six-teams-confirmed","isFakeNews":true,"createdAt":"2020-10-02T22:27:44.343Z","__v":0},{"_id":"5f77a96f2c4c6cbb3fa4b141","verifiedBy":"pedrosarkisverani@gmail.com","content":"The event will be held online on November 30-December 6 in four regions, Europe, North America, Asia, and Oceania, and will have a combined $250,000 prizepool on offer.The European side of the competition will feature 16 teams, 12 of whom will receive direct invites while the remaining quartet will come from qualifiers. Partner teams Astralis, G2, Natus Vincere, and Complexity have already been confirmed for the tournament, which will begin with two double-elimination groups of eight, followed by a single-elimination playoffs bracket.Over in North America, Evil Geniuses and Liquid will be joined by four more invited sides and two via qualifiers in a GSL-style group stage before the tournament culminates with a single-elimination bracket.Asia and Oceania will comprise four teams each, who will take part in a double-elimination bracket. None of the participants, who will also be determined via a combination of invites and qualifiers (three to one), have been revealed in the two regions.DreamHack Masters Winter will be the last Masters-level tournament in the ESL Pro Tour awarding points towards IEM Katowice, the next Masters Championship in the prestigious circuit.The following six teams have been confirmed so far, with more to be announced shortly.","url":"https://www.hltv.org/news/30264/dreamhack-announce-masters-winter-six-teams-confirmed","isFakeNews":true,"createdAt":"2020-10-02T22:27:59.087Z","__v":0}]}

pedrosarkis commented 3 years ago

Veja que news é um array de obj, tem a chave _id, content ,url,isFakeNEws e createdAt

pablobion commented 3 years ago

Feito. Itens pendentes: limpar histórico, já temos issue para isso, e deletar acc, ja temos outra issue também.