30 lines
677 B
PHP
30 lines
677 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 UpdateProjectBranch extends ApiBranch
|
||
|
{
|
||
|
function get(ParamCleaner $params)
|
||
|
{
|
||
|
respondStatus(405);
|
||
|
}
|
||
|
|
||
|
function post(ParamCleaner $params)
|
||
|
{
|
||
|
$user_id = $params->get("user_id");
|
||
|
|
||
|
if ($params->exists(["project"]) == false) {
|
||
|
respondStatus(400, "Missing parameter");
|
||
|
}
|
||
|
|
||
|
updateProject($user_id, $params->get("project"));
|
||
|
|
||
|
respondStatus(200);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$branch = new UpdateProjectBranch();
|
||
|
$branch->execute();
|