Exemple #1
0
    $controller = new TweetController();
    $controller->create();
});
$app->delete('/tweet/:id', function ($id) {
    fAuthorization::requireLoggedIn();
    $controller = new TweetController();
    $controller->delete($id);
});
$app->post('/tweet/:id/reply', function ($id) {
    fAuthorization::requireLoggedIn();
    $controller = new TweetController();
    $controller->reply($id);
});
$app->post('/article/preview', function () {
    fAuthorization::requireLoggedIn();
    $controller = new PreviewController();
    $controller->show();
});
$app->post('/article/:id/reply', function ($id) {
    fAuthorization::requireLoggedIn();
    $controller = new ArticleController();
    $controller->reply($id);
});
/*
$app->get('/intro', function () {
 UserHelper::requireProfile();
 $controller = new VideoController();
 $controller->show();
});
*/
$app->get('/register', function () {
 /**
  * @PublicPage
  * @UseSession
  *
  * Shows a large preview of a file
  *
  * The session needs to be maintained open or previews can't be generated
  * for files located on encrypted storage
  *
  * @inheritDoc
  *
  * @param int $fileId the ID of the file of which we need a large preview of
  * @param int $width
  * @param int $height
  */
 public function getPreview($fileId, $width, $height)
 {
     return parent::getPreview($fileId, $width, $height);
 }
 /**
  * @PublicPage
  * @UseSession
  *
  * Shows a large preview of a file
  *
  * The session needs to be maintained open or previews can't be generated
  * for files located on encrypted storage
  *
  * @inheritDoc
  *
  * @param int $fileId the ID of the file of which we need a large preview of
  * @param int $width
  * @param int $height
  * @param string|null $download
  */
 public function getPreview($fileId, $width, $height, $download)
 {
     return parent::getPreview($fileId, $width, $height, $download);
 }