mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 05:32:18 +00:00
- Jellyfin scrobble working - Returns scrobbles via API for authed users /api/v1/user/{uuid}/scrobble - Add redis handler + funcs - Move middleware to pass in uuid as needed
45 lines
No EOL
848 B
JavaScript
45 lines
No EOL
848 B
JavaScript
import React, { Component } from "react";
|
|
|
|
import UserService from "../Services/user.service";
|
|
|
|
class Admin extends Component {
|
|
constructor(props) {
|
|
super(props);
|
|
|
|
this.state = {
|
|
content: ""
|
|
};
|
|
}
|
|
|
|
componentDidMount() {
|
|
UserService.getAdminBoard().then(
|
|
response => {
|
|
this.setState({
|
|
content: response.data
|
|
});
|
|
},
|
|
error => {
|
|
this.setState({
|
|
content:
|
|
(error.response &&
|
|
error.response.data &&
|
|
error.response.data.message) ||
|
|
error.message ||
|
|
error.toString()
|
|
});
|
|
}
|
|
);
|
|
}
|
|
|
|
render() {
|
|
return (
|
|
<div className="container">
|
|
<header className="jumbotron">
|
|
<h3>{this.state.content}</h3>
|
|
</header>
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default Admin; |