Fixed the /api usage in web prod

This commit is contained in:
Clément Le Bihan
2023-11-29 18:47:23 +01:00
parent b417076ee6
commit dfdbbdc51c

View File

@@ -67,7 +67,7 @@ export class ValidationError extends Error {
export default class API {
public static readonly baseUrl =
Platform.OS === 'web' && !process.env.EXPO_PUBLIC_API_URL
Platform.OS === 'web' && !(__DEV__ && process.env.EXPO_PUBLIC_API_URL)
? '/api'
: process.env.EXPO_PUBLIC_API_URL!;
public static async fetch(