mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 05:02:50 +08:00
fixes flow, and before_action in permissions_controller
This commit is contained in:
parent
b106545d31
commit
e0e3ef9359
3 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
module ClientApi
|
module ClientApi
|
||||||
class PermissionsController < ApplicationController
|
class PermissionsController < ApplicationController
|
||||||
before_action :generate_permissions_object, only: :state
|
before_action :generate_permissions_object, only: :status
|
||||||
|
|
||||||
def status
|
def status
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -14,7 +14,7 @@ import { getSciNoteInfo } from "../../../services/api/configurations_api";
|
||||||
import AboutScinoteModal from "./AboutScinoteModal";
|
import AboutScinoteModal from "./AboutScinoteModal";
|
||||||
|
|
||||||
type State = {
|
type State = {
|
||||||
modalOpen: boolean,
|
showModal: boolean,
|
||||||
scinoteVersion: string,
|
scinoteVersion: string,
|
||||||
addons: Array<string>
|
addons: Array<string>
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,7 +23,7 @@ type State = {
|
||||||
};
|
};
|
||||||
|
|
||||||
type PermissionsObject = {
|
type PermissionsObject = {
|
||||||
[string]: boolean
|
[string]: boolean | null
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
This function accepts 3 arguments which are REQUIRED
|
This function accepts 3 arguments which are REQUIRED
|
||||||
|
@ -42,7 +42,7 @@ export function connect<Props: {}>(
|
||||||
parsedPermissions[el] = null;
|
parsedPermissions[el] = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
return class extends React.Component<*, State, *> {
|
return class extends React.Component<*, State> {
|
||||||
constructor(props: any) {
|
constructor(props: any) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = { permissions: parsedPermissions };
|
this.state = { permissions: parsedPermissions };
|
||||||
|
|
Loading…
Reference in a new issue