Merge pull request #834 from MikeSouza/new/list-api

Add API support for list actions
This commit is contained in:
Mark Drobnak
2018-09-01 19:29:01 -04:00
committed by GitHub
4 changed files with 42 additions and 7 deletions

View File

@@ -7,12 +7,15 @@
* Please see LICENSE file for your rights under this license. */ ?>
<?php
require('auth.php');
require_once('auth.php');
$type = $_POST['list'];
// All of the verification for list editing
list_verify($type);
// Perform all of the verification for list editing
// when NOT invoked and authenticated from API
if (!$api) {
list_verify($type);
}
switch($type) {
case "white":

View File

@@ -14,7 +14,7 @@ $listtype = $_GET['list'];
$basedir = "/etc/pihole/";
require "func.php";
require_once "func.php";
switch ($listtype) {
case "white":

View File

@@ -7,12 +7,15 @@
* Please see LICENSE file for your rights under this license. */ ?>
<?php
require('auth.php');
require_once('auth.php');
$type = $_POST['list'];
// All of the verification for list editing
list_verify($type);
// Perform all of the verification for list editing
// when NOT invoked and authenticated from API
if (!$api) {
list_verify($type);
}
switch($type) {
case "white":