deckek elmentodnek sqlbe

This commit is contained in:
2025-10-15 18:13:53 +02:00
parent 367524d611
commit 75f2b215a1
3 changed files with 32 additions and 5 deletions
+15
View File
@@ -0,0 +1,15 @@
import { apiClient } from './userApi'
// Create a new deck in the backend
export const createDeck = async (deck) => {
try {
const response = await apiClient.post('/decks', deck)
return response.data
} catch (err) {
throw err
}
}
export default {
createDeck
}
+1 -1
View File
@@ -1,7 +1,7 @@
import axios from "axios"
export const API_CONFIG = {
baseURL: import.meta.env.VITE_API_URL + "/api",
baseURL: (import.meta.env.VITE_API_URL ? import.meta.env.VITE_API_URL : '') + "/api",
wsURL: "http://localhost:3000",
timeout: 10000,
retryAttempts: 3,