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

This commit is contained in:
2021-01-29 22:15:17 +00:00
parent fbf286c09c
commit b6ab359a37
21 changed files with 70 additions and 60 deletions

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
});