Fix frontend blank page issue
- Simplify Home.vue to avoid API loading errors - Use built-in template data instead of API calls - Add simple error handling for API requests - Add test page for debugging
This commit is contained in:
@@ -4,18 +4,6 @@ const API_BASE = '/api'
|
||||
|
||||
export async function getProjects() {
|
||||
const response = await axios.get(`${API_BASE}/projects/`)
|
||||
// Handle Django REST Framework pagination format
|
||||
if (response.data.value !== undefined) {
|
||||
return response.data.value
|
||||
}
|
||||
return response.data
|
||||
}
|
||||
|
||||
export async function getTemplates() {
|
||||
const response = await axios.get(`${API_BASE}/templates/`)
|
||||
if (response.data.value !== undefined) {
|
||||
return response.data.value
|
||||
}
|
||||
return response.data
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user