Add endpoint to retrieve all available languages in VocabController and VocabRouter
- Introduced a new method in VocabService to list all languages from the database. - Updated VocabController to wrap the new method for user access. - Added a new route in VocabRouter to handle requests for all languages. - Modified VocabCourseListView to utilize the new endpoint for loading languages, enhancing the course selection experience.
This commit is contained in:
@@ -165,7 +165,8 @@ export default {
|
||||
methods: {
|
||||
async loadLanguages() {
|
||||
try {
|
||||
const res = await apiClient.get('/api/vocab/languages');
|
||||
// Verwende /languages/all für die Kursliste, um alle Sprachen anzuzeigen
|
||||
const res = await apiClient.get('/api/vocab/languages/all');
|
||||
this.languages = res.data?.languages || [];
|
||||
|
||||
// Lade die Muttersprache des Benutzers
|
||||
|
||||
Reference in New Issue
Block a user