Skip to content

Commit

Permalink
Clean up weird if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
LunarWatcher committed Aug 22, 2024
1 parent b2a55be commit 8fe96ce
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/hazel/features/miniflux/MinifluxProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,13 @@ void hazel::minifluxForwardToProxy(HazelCore& server, crow::request& req, crow::
auto proxyIt = conf.miniflux_proxies.find(username);
if (proxyIt == conf.miniflux_proxies.end() || proxyIt->second.passphrase != password) {
res.code = 404;
if (proxyIt == conf.miniflux_proxies.end()) {
spdlog::info("{} attempted to access undefined webhook ({})", req.remote_ip_address, username);
} else {
spdlog::info("{} failed to log into {}", req.remote_ip_address, username);
}
spdlog::info(
"{} failed to log into {} (exists: {})",
req.remote_ip_address,
username,
proxyIt == conf.miniflux_proxies.end()
);

HAZEL_JSON(res);
res.end(R"({"message": "Webhook not found"})");
return;
Expand Down

0 comments on commit 8fe96ce

Please sign in to comment.