add API node type instead of always use string to define api node
This commit is contained in:
@ -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
|
||||
});
|
||||
|
Reference in New Issue
Block a user