✔️ Rollbar FBOS version

This commit is contained in:
Rick Carlino 2018-03-19 11:39:25 -05:00
parent 5fb465ee79
commit 46a2df4501
3 changed files with 1 additions and 2 deletions

View file

@ -16,7 +16,6 @@ class DashboardController < ApplicationController
[:main_app, :front_page, :verify, :password_reset].map do |actn|
define_method(actn) do
@rev = LONG_REVISION
@fbos_version = current_user&.device&.fbos_version || "0.0.0"
begin
response.headers["Cache-Control"] = "no-cache, no-store"
response.headers["Pragma"] = "no-cache"

View file

@ -14,7 +14,6 @@ try {
captureUnhandledRejections: true,
payload: {
person: user,
fbos: <%= raw (@fbos_version || "0.0.0").to_json %>,
environment: window.location.host,
client: {
javascript: {

View file

@ -107,6 +107,7 @@ export function shouldDisplay(
const target = override || current;
if (isString(target)) {
const min = (lookupData || {})[feature] || MinVersionOverride.NEVER;
Rollbar.configure({payload: {fbos: target}});
switch (semverCompare(target, min)) {
case SemverResult.LEFT_IS_GREATER:
case SemverResult.EQUAL: