You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

12 lines
375 B

  1. const axios = require('axios').default;
  2. async function summaryList(token){
  3. const response = await axios.get(process.env.backend_url+'/api/pintar-summaries?populate=*&sort[0]=id:desc',{
  4. headers: {'Authorization': `Bearer ${token}`}
  5. }).catch((e)=>{
  6. console.log(e.response.body);
  7. });
  8. return (response)?response.data.data:[];
  9. }
  10. module.exports = {summaryList};