date-poll-sf5/public/old/MigrationController.php

33 lines
706 B
PHP
Raw Permalink Normal View History

2021-04-08 16:45:04 +02:00
<?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 );
}
}