Refac remove loadVideoProgressById

This commit is contained in:
MerlinScheurer
2024-12-23 15:56:56 +01:00
parent e5e51f1a60
commit 1ca34400f0
6 changed files with 12 additions and 58 deletions

View File

@@ -1,23 +0,0 @@
import defaultHeaders from '../../configuration/defaultHeaders';
import getApiUrl from '../../configuration/getApiUrl';
import getFetchCredentials from '../../configuration/getFetchCredentials';
import isDevEnvironment from '../../functions/isDevEnvironment';
const loadVideoProgressById = async (youtubeId: string) => {
const apiUrl = getApiUrl();
const response = await fetch(`${apiUrl}/api/video/${youtubeId}/progress/`, {
headers: defaultHeaders,
credentials: getFetchCredentials(),
});
const videoProgress = await response.json();
if (isDevEnvironment()) {
console.log('loadVideoProgressById', videoProgress);
}
return videoProgress;
};
export default loadVideoProgressById;