mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Two new routes: * `GET /{_locale}/person/api/1.0/accompanying-course/{parcours_id}/show.json`: get a json representation for a course * `POST /{_locale}/person/api/1.0/accompanying-course/{parcours_id}/participation.json`: add a particitipation to course. Usage: `curl -v --cookie "PHPSESSID=fed98aa23e40cb36e630f84155aea3bb;" -X POST --data '{ "id": 481 }' http://localhost:8001/fr/person/api/1.0/accompanying-course/270/participation.json` Will add the person with id "481" to the course.
31 lines
1.0 KiB
PHP
31 lines
1.0 KiB
PHP
<?php
|
|
/*
|
|
* Copyright (C) 2015-2021 Champs-Libres Coopérative <info@champs-libres.coop>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
namespace Chill\PersonBundle\Controller;
|
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
|
|
|
|
|
class ApiPersonController extends Controller
|
|
{
|
|
public function viewAction($id, $_format)
|
|
{
|
|
|
|
}
|
|
}
|