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 lines
410 B
19 lines
410 B
import axios from 'axios';
|
|
|
|
export default {
|
|
data() {
|
|
return {
|
|
userList: [],
|
|
};
|
|
},
|
|
mounted() {
|
|
// Make a GET request to fetch user data from your Django API
|
|
axios.get('http://172.0.0.1:8000/user/list/')
|
|
.then((response) => {
|
|
this.userList = response.data;
|
|
})
|
|
.catch((error) => {
|
|
console.error('Error fetching user data:', error);
|
|
});
|
|
},
|
|
};
|
|
|