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
class PermissionsController < ApplicationController
before_action :generate_permissions_object, only: :state
before_action :generate_permissions_object, only: :status
def status
respond_to do |format|

View file

@ -14,7 +14,7 @@ import { getSciNoteInfo } from "../../../services/api/configurations_api";
import AboutScinoteModal from "./AboutScinoteModal";
type State = {
modalOpen: boolean,
showModal: boolean,
scinoteVersion: string,
addons: Array<string>
};

View file

@ -23,7 +23,7 @@ type State = {
};
type PermissionsObject = {
[string]: boolean
[string]: boolean | null
}
/*
This function accepts 3 arguments which are REQUIRED
@ -42,7 +42,7 @@ export function connect<Props: {}>(
parsedPermissions[el] = null;
});
return class extends React.Component<*, State, *> {
return class extends React.Component<*, State> {
constructor(props: any) {
super(props);
this.state = { permissions: parsedPermissions };