From f26c7b45c394e91ce7603b4418f138b327573cc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Wed, 1 Nov 2023 22:16:41 +0100 Subject: [PATCH] Remove traces of reboot and poweroff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- src/api/api.h | 2 -- src/api/docs/content/specs/action.yaml | 50 -------------------------- src/api/docs/content/specs/main.yaml | 6 ---- 3 files changed, 58 deletions(-) diff --git a/src/api/api.h b/src/api/api.h index 4757e3db..9950ada5 100644 --- a/src/api/api.h +++ b/src/api/api.h @@ -105,8 +105,6 @@ int api_teleporter(struct ftl_conn *api); // Action methods int api_action_gravity(struct ftl_conn *api); -int api_action_poweroff(struct ftl_conn *api); -int api_action_reboot(struct ftl_conn *api); int api_action_restartDNS(struct ftl_conn *api); int api_action_flush_logs(struct ftl_conn *api); int api_action_flush_arp(struct ftl_conn *api); diff --git a/src/api/docs/content/specs/action.yaml b/src/api/docs/content/specs/action.yaml index c7f08033..dd245e2e 100644 --- a/src/api/docs/content/specs/action.yaml +++ b/src/api/docs/content/specs/action.yaml @@ -63,56 +63,6 @@ components: application/json: schema: $ref: 'common.yaml#/components/errors/unauthorized' - reboot: - post: - summary: Reboot the system - tags: - - Actions - operationId: "action_reboot" - description: | - Reboots the system Pi-hole is running on. Note that this should be done as a last-resort only as it will forcefully interrupt all currently running processes. - responses: - '200': - description: OK - content: - application/json: - schema: - allOf: - - $ref: 'common.yaml#/components/schemas/success' - - $ref: 'common.yaml#/components/schemas/took' - '401': - description: Unauthorized - content: - application/json: - schema: - allOf: - - $ref: 'common.yaml#/components/errors/unauthorized' - - $ref: 'common.yaml#/components/schemas/took' - poweroff: - post: - summary: Poweroff the system - tags: - - Actions - operationId: "action_poweroff" - description: | - Halts and powers off the system Pi-hole is running on. Note that this should be done as a last-resort only as it will forcefully interrupt all currently running processes. - responses: - '200': - description: OK - content: - application/json: - schema: - allOf: - - $ref: 'common.yaml#/components/schemas/success' - - $ref: 'common.yaml#/components/schemas/took' - '401': - description: Unauthorized - content: - application/json: - schema: - allOf: - - $ref: 'common.yaml#/components/errors/unauthorized' - - $ref: 'common.yaml#/components/schemas/took' restartdns: post: summary: Restart pihole-FTL diff --git a/src/api/docs/content/specs/main.yaml b/src/api/docs/content/specs/main.yaml index 64d0fafe..4f072c6c 100644 --- a/src/api/docs/content/specs/main.yaml +++ b/src/api/docs/content/specs/main.yaml @@ -244,12 +244,6 @@ paths: /action/flush/arp: $ref: 'action.yaml#/components/paths/flush_arp' - /action/reboot: - $ref: 'action.yaml#/components/paths/reboot' - - /action/poweroff: - $ref: 'action.yaml#/components/paths/poweroff' - /dhcp/leases: $ref: 'dhcp.yaml#/components/paths/leases'