Skip to content

Commit

Permalink
Prepare the nudging message for PS plugins < 2.*.* (kubeflow#2)
Browse files Browse the repository at this point in the history
* - added nudging message for old CEP PS plugin

* Update requirements.in

* Update requirements.in

* Update requirements.in

Co-authored-by: Andreas Braumann <brew@brew.at>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Alexander Graf <alex@basecamp.tirol>
  • Loading branch information
4 people authored Sep 7, 2021
1 parent 832ad2a commit 1685909
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions api/src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
const logger = require("kaleido-api/logger");
require("dotenv").config()

if(process.env.NODE_ENV == "development") {
require("dotenv").config()

const mockery = require("mockery")
mockery.enable({
warnOnUnregistered: false
})
mockery.registerSubstitute("kaleido-api/core", "mock/core_mock")
mockery.registerSubstitute("kaleido-api/core", "./mock/core_mock")
}

const https = require('https');
Expand Down Expand Up @@ -124,7 +123,11 @@ function startServer() {
case "photoshop":
// req.query.v == "1.0.0"
// req.query.v == "1.0.1"
res.json({"status": "ok"});
if (req.query.v.split('.')[0]=="1") { // send warning nudge to all users of CEP plugin
res.json({"status": "warning", "message": "<b>⚠️ This plugin is outdated</b><br>Learn how to upgrade to the new version in the FAQ section. www.remove.bg/photoshop"});
} else {
res.json({"status": "ok"});
}
break;
case "desktop":
// req.query.v == "1.0.0"
Expand Down

0 comments on commit 1685909

Please sign in to comment.