Skip to content
Snippets Groups Projects
Commit a908763a authored by Princelle Maxime's avatar Princelle Maxime :gay_pride_flag:
Browse files

:sparkles: adding money

parent 7e700769
Branches
1 merge request!7🔀 V1
import axios from 'axios';
const BASE_URL = "https://" + process.env.REACT_APP_MONEY_URL;
// Fetch users from API
export function getTransactions(studentNumber: string): Promise<any> {
return new Promise((resolve, reject) => {
axios.get(`${BASE_URL}/transactions/get/${studentNumber}`, {
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json'
}
}).then(function ({ data }) {
console.log(data);
resolve(data);
}).catch(function (error) {
console.error(error);
reject(error);
});
});
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment