add API node type instead of always use string to define api node

This commit is contained in:
lukas committed 2021-01-29 22:15:17 +00:00
1 parent fbf286c09c
commit b6ab359a37
21 files changed
+70 -60

No files matched your search

+2 -2
View File
@@ -3,7 +3,7 @@ import style from './Preview.module.css';
import {Spinner} from 'react-bootstrap';
import {Link} from 'react-router-dom';
import GlobalInfos from '../../utils/GlobalInfos';
import {callAPIPlain} from '../../utils/Api';
import {APINode, callAPIPlain} from '../../utils/Api';
interface PreviewProps {
name: string;
@@ -28,7 +28,7 @@ class Preview extends React.Component<PreviewProps, PreviewState> {
}
componentDidMount(): void {
callAPIPlain('video.php', {action: 'readThumbnail', movieid: this.props.movie_id}, (result) => {
callAPIPlain(APINode.Video, {action: 'readThumbnail', movieid: this.props.movie_id}, (result) => {
this.setState({
previewpicture: result
});