Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement very crude and bare-bones RSS feed #5047

Merged
merged 5 commits into from
Sep 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: handle case when slug is not found
  • Loading branch information
MrYakobo committed Aug 26, 2024
commit 74e5d91a574bb6a67119b6d8e0a5f3cd3a6e8fe0
7 changes: 6 additions & 1 deletion server/model/status_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ class StatusPage extends BeanModel {
let statusPage = await R.findOne("status_page", " slug = ? ", [
MrYakobo marked this conversation as resolved.
Show resolved Hide resolved
slug
]);
response.send(await StatusPage.renderRSS(statusPage, slug));

if (statusPage) {
response.send(await StatusPage.renderRSS(statusPage, slug));
} else {
response.status(404).send(UptimeKumaServer.getInstance().indexHTML);
}
}

/**
Expand Down