forked from p15670423/monkey
Remove authentication from version info resource
Add new line at end of server_config.json
This commit is contained in:
parent
d486471fb2
commit
8523075494
|
@ -14,7 +14,8 @@ class VersionUpdate(flask_restful.Resource):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(VersionUpdate, self).__init__()
|
super(VersionUpdate, self).__init__()
|
||||||
|
|
||||||
@jwt_required()
|
# We don't secure this since it doesn't give out any private info and we want UI to know version
|
||||||
|
# even when not authenticated
|
||||||
def get(self):
|
def get(self):
|
||||||
return {
|
return {
|
||||||
'current_version': env.get_version(),
|
'current_version': env.get_version(),
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import AuthComponent from "../AuthComponent";
|
|
||||||
import {Icon} from 'react-fa';
|
import {Icon} from 'react-fa';
|
||||||
|
|
||||||
class VersionComponent extends AuthComponent {
|
class VersionComponent extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
|
@ -13,7 +12,7 @@ class VersionComponent extends AuthComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.authFetch('/api/version-update')
|
this.fetch('/api/version-update') // This is not authenticated on purpose
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
Loading…
Reference in New Issue