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: added HTTP method option for push monitor #1991

Merged
merged 9 commits into from
May 24, 2024
3 changes: 1 addition & 2 deletions server/routers/api-router.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ router.get("/api/entry-page", async (request, response) => {
response.json(result);
});

router.get("/api/push/:pushToken", async (request, response) => {
router.all("/api/push/:pushToken", async (request, response) => {
try {

let pushToken = request.params.pushToken;
let msg = request.query.msg || "OK";
let ping = parseFloat(request.query.ping) || null;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/EditMonitor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@
</template>

<!-- HTTP Options -->
<template v-if="monitor.type === 'http' || monitor.type === 'keyword' || monitor.type === 'json-query' ">
<template v-if="monitor.type === 'http' || monitor.type === 'keyword' || monitor.type === 'json-query' || monitor.type === 'push' ">
0tt0sson marked this conversation as resolved.
Show resolved Hide resolved
<h2 class="mt-5 mb-2">{{ $t("HTTP Options") }}</h2>

<!-- Method -->
Expand Down
Loading