fixes flow, and before_action in permissions_controller

This commit is contained in:
zmagod 2018-01-03 17:23:50 +01:00
parent b106545d31
commit e0e3ef9359
3 changed files with 4 additions and 4 deletions

View file

@ -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|

View file

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

View file

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