1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

player: renamed apiGetEmbedYoutube

This commit is contained in:
Fedor Katurov 2021-03-03 11:18:16 +07:00
parent 7d4df40963
commit 4da55dcd21
2 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,7 @@ import { api, cleanResult } from '~/utils/api';
import { API } from '~/constants/api';
import { ApiGetEmbedYoutubeResult } from '~/redux/player/types';
export const getEmbedYoutube = (ids: string[]) =>
export const apiGetEmbedYoutube = (ids: string[]) =>
api
.get<ApiGetEmbedYoutubeResult>(API.EMBED.YOUTUBE, { params: { ids: ids.join(',') } })
.then(cleanResult);

View file

@ -10,7 +10,7 @@ import {
import { Player } from '~/utils/player';
import { getURL } from '~/utils/dom';
import { Unwrap } from '../types';
import { getEmbedYoutube } from './api';
import { apiGetEmbedYoutube } from './api';
import { selectPlayer } from './selectors';
function* setFileAndPlaySaga({ file }: ReturnType<typeof playerSetFile>) {
@ -67,7 +67,7 @@ function* getYoutubeInfo() {
}
try {
const data: Unwrap<typeof getEmbedYoutube> = yield call(getEmbedYoutube, ids);
const data: Unwrap<typeof apiGetEmbedYoutube> = yield call(apiGetEmbedYoutube, ids);
if (data.items && Object.keys(data.items).length) {
const { youtubes }: ReturnType<typeof selectPlayer> = yield select(selectPlayer);