From e0e3ef93596264d2b65513433c08f725aad35ef5 Mon Sep 17 00:00:00 2001 From: zmagod Date: Wed, 3 Jan 2018 17:23:50 +0100 Subject: [PATCH] fixes flow, and before_action in permissions_controller --- app/controllers/client_api/permissions_controller.rb | 2 +- .../src/components/Navigation/components/InfoDropdown.jsx | 2 +- app/javascript/src/services/permissions/index.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/client_api/permissions_controller.rb b/app/controllers/client_api/permissions_controller.rb index 5ae4144bf..807f36a27 100644 --- a/app/controllers/client_api/permissions_controller.rb +++ b/app/controllers/client_api/permissions_controller.rb @@ -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| diff --git a/app/javascript/src/components/Navigation/components/InfoDropdown.jsx b/app/javascript/src/components/Navigation/components/InfoDropdown.jsx index e01328f56..1468827e6 100644 --- a/app/javascript/src/components/Navigation/components/InfoDropdown.jsx +++ b/app/javascript/src/components/Navigation/components/InfoDropdown.jsx @@ -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 }; diff --git a/app/javascript/src/services/permissions/index.js b/app/javascript/src/services/permissions/index.js index 2b1eafb85..49bfd7c70 100644 --- a/app/javascript/src/services/permissions/index.js +++ b/app/javascript/src/services/permissions/index.js @@ -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( parsedPermissions[el] = null; }); - return class extends React.Component<*, State, *> { + return class extends React.Component<*, State> { constructor(props: any) { super(props); this.state = { permissions: parsedPermissions };