Refactor Stripe payment handling and order status
Refactored Stripe payment integration to use a dedicated Stripe model for session data, updating the PaymentSerializer accordingly. Renamed Order.Status to Order.OrderStatus for clarity. Updated configuration app to ensure SiteConfiguration singleton is created post-migration. Removed obsolete seed_app_config command from docker-compose. Adjusted frontend API generated files and moved orval config.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
v tehle složce se vygeneruje schema
|
||||
1
frontend/src/api/generated/private/models/filler
Normal file
1
frontend/src/api/generated/private/models/filler
Normal file
@@ -0,0 +1 @@
|
||||
filler
|
||||
@@ -1,4 +1,4 @@
|
||||
import axios from "axios";
|
||||
import axios, { type AxiosRequestConfig } from "axios";
|
||||
|
||||
// použij tohle pro API vyžadující autentizaci
|
||||
export const privateApi = axios.create({
|
||||
@@ -25,3 +25,11 @@ privateApi.interceptors.response.use(
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
export const privateMutator = async <T>(
|
||||
config: AxiosRequestConfig
|
||||
): Promise<T> => {
|
||||
const response = await privateApi.request<T>(config);
|
||||
return response.data;
|
||||
};
|
||||
@@ -1,7 +1,16 @@
|
||||
import axios from "axios";
|
||||
import axios, { type AxiosRequestConfig } from "axios";
|
||||
|
||||
// použij tohle pro veřejné API nevyžadující autentizaci
|
||||
export const publicApi = axios.create({
|
||||
baseURL: "/api/",
|
||||
withCredentials: false, // veřejné API NEPOSÍLÁ cookies
|
||||
});
|
||||
|
||||
|
||||
// ⬇⬇⬇ TOHLE JE TEN MUTATOR ⬇⬇⬇
|
||||
export const publicMutator = async <T>(
|
||||
config: AxiosRequestConfig
|
||||
): Promise<T> => {
|
||||
const response = await publicApi.request<T>(config);
|
||||
return response.data;
|
||||
};
|
||||
Reference in New Issue
Block a user