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.
 
 
 

19 line
471 B

  1. const axios = require('axios').default;
  2. async function autoClear(token) {
  3. const response = await axios
  4. .get(`${process.env.backend_url}/api/clear-monthly`, {
  5. headers: {
  6. Authorization: `Bearer ${token}`,
  7. },
  8. })
  9. .catch(e => {
  10. // eslint-disable-next-line no-console
  11. // console.log(e);
  12. console.log("error pull auto-clear settings");
  13. });
  14. return response ? response.data.data : null;
  15. }
  16. module.exports = { autoClear };