juggl/public/api/removeProject.php
2021-01-07 23:19:18 +01:00

29 lines
664 B
PHP

<?php
session_start();
require_once(__DIR__ . "/services/apiBranch.inc.php");
require_once(__DIR__ . "/services/responses.inc.php");
require_once(__DIR__ . "/services/jugglDbApi.inc.php");
class RemoveProjectBranch extends ApiBranch
{
function get(ParamCleaner $params)
{
respondStatus(405);
}
function post(ParamCleaner $params)
{
$user_id = $params->get("user_id");
if ($params->exists(["project_id"]) == false) {
respondStatus(400, "Missing parameter");
}
removeProject($user_id, $params);
respondStatus(200);
}
}
$branch = new RemoveProjectBranch();
$branch->execute();