33 lines
706 B
PHP
33 lines
706 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Controller;
|
||
|
|
||
|
use App\Entity\Poll;
|
||
|
use FOS\RestBundle\Controller\Annotations\Get;
|
||
|
use FOS\RestBundle\Controller\Annotations\Route;
|
||
|
|
||
|
/**
|
||
|
* Class DefaultController
|
||
|
* @package App\Controller
|
||
|
* @Route("/migration-from-v1",name="admin_homepage")
|
||
|
*/
|
||
|
class MigrationController extends FramadateController {
|
||
|
/**
|
||
|
* @Get(path ="/{unique_key}",
|
||
|
* name = "_migrate_from_v1")
|
||
|
*/
|
||
|
public function indexAction() {
|
||
|
// get env vars
|
||
|
// check uniq key is good
|
||
|
// fetch old Database
|
||
|
// gather objects
|
||
|
// create new polls
|
||
|
// success
|
||
|
// failure notice
|
||
|
|
||
|
return $this->json( [ "message" => "welcome to the framadate migration endpoint, it has yet to be done" ],
|
||
|
200 );
|
||
|
}
|
||
|
|
||
|
}
|