Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Herwege <[email protected]>
  • Loading branch information
mherwege committed Feb 10, 2025
1 parent b14e30f commit a575c5b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ public interface MyBMWConstants {

static final int DEFAULT_REFRESH_INTERVAL_MINUTES = 60;

static final String BASE_PATH = "/" + BINDING_ID + "/";
static final String LOCAL_OPENHAB_BASE_PATH = "/" + BINDING_ID + "/";

static final String HTML_SOURCE = "captcha/";
static final String CAPTCHA_URL_ROOT = "captcha/";
static final String NORTH_AMERICA = "NORTH_AMERICA";
static final String ROW = "ROW";
static final Map<String, String> CAPTCHA_HTML = Map.of(NORTH_AMERICA, HTML_SOURCE + "north_america_form.html", ROW,
HTML_SOURCE + "rest_of_world_form.html");
static final Map<String, String> CAPTCHA_HTML = Map.of(NORTH_AMERICA, CAPTCHA_URL_ROOT + "north_america_form.html", ROW,
CAPTCHA_URL_ROOT + "rest_of_world_form.html");

static final String STATUS_AUTH_NEEDED = "@text/mybmw.status.authorization-needed";
static final String STATUS_USER_DETAILS_MISSING = "@text/mybmw.status.user-details-missing";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public void initialize() {
return;
}
}
// Update the central configuration and get the updates configuration back
super.updateConfiguration(config);
localBridgeConfiguration = getConfigAs(MyBMWBridgeConfiguration.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class MyBMWAuthServlet extends HttpServlet {
public MyBMWAuthServlet(MyBMWBridgeHandler bridgeHandler, String region, HttpService httpService) {
this.httpService = httpService;
this.bridgeHandler = bridgeHandler;
this.path = MyBMWConstants.BASE_PATH + bridgeHandler.getThing().getUID().getAsString();
this.path = MyBMWConstants.LOCAL_OPENHAB_BASE_PATH + bridgeHandler.getThing().getUID().getAsString();
String captchaTemplate = MyBMWConstants.CAPTCHA_HTML.get(region);
if (captchaTemplate != null) {
try (InputStream stream = classLoader.getResourceAsStream(captchaTemplate)) {
Expand Down

0 comments on commit a575c5b

Please sign in to comment.