deckek elmentodnek sqlbe
This commit is contained in:
@@ -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,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,
|
||||
|
||||
Reference in New Issue
Block a user