api: update key to api
This commit is contained in:
@@ -8,7 +8,13 @@ const STREAMING_SERVICE_API_URL = "http://45.157.177.99:8080/config";
|
||||
|
||||
export async function getStreamingImages(): Promise<StreamingServiceRaw[]> {
|
||||
try {
|
||||
const response = await fetch(STREAMING_SERVICE_API_URL);
|
||||
const apiKey = process.env.EXPO_PUBLIC_API_KEY;
|
||||
const response = await fetch(STREAMING_SERVICE_API_URL, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-API-Key": apiKey ?? "",
|
||||
},
|
||||
});
|
||||
if (!response.ok) {
|
||||
throw new Error("Network response was not ok");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user