2016-09-01 16:23:39 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Web Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| This file is where you may define all of the routes that are handled
|
|
|
|
| by your application. Just tell Laravel the URIs it should respond
|
|
|
|
| to using a Closure or controller method. Build something great!
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
Auth::routes();
|
|
|
|
|
2016-11-03 13:33:35 +00:00
|
|
|
Route::get('/openstack-test', function ()
|
|
|
|
{
|
|
|
|
$credentials = new \Aws\Credentials\Credentials('vyUv2MDny84Q3VD6Zvg0', 'TuQSzRbx3f6Rmnnf_N4LXod5DCtgUfGwprot7UpQ');
|
|
|
|
|
|
|
|
$client = new \Aws\S3\S3Client(array(
|
|
|
|
'endpoint' => 'https://objects-us-west-1.dream.io',
|
|
|
|
'credentials' => $credentials,
|
|
|
|
'version' => 'latest',
|
|
|
|
'region' => 'xxx'
|
|
|
|
));
|
|
|
|
|
|
|
|
$blist = $client->listBuckets();
|
|
|
|
echo " Buckets belonging to " . $blist['Owner']['ID'] . ":\n";
|
|
|
|
foreach ($blist['Buckets'] as $b) {
|
|
|
|
echo "{$b['Name']}\t{$b['CreationDate']}\n";
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2016-09-01 16:23:39 +01:00
|
|
|
// Administration
|
|
|
|
Route::group(['prefix' => 'admin'], function () {
|
|
|
|
Route::get('/', 'Admin\DefaultController@index')->name('admin');
|
2016-09-05 15:28:56 +01:00
|
|
|
Route::post('settings/save', 'Admin\DefaultController@saveSettings')->name('admin.saveSettings');
|
2016-09-06 13:26:02 +01:00
|
|
|
Route::post('settings/test-email', 'Admin\DefaultController@testMailSettings')->name('admin.testMailSettings');
|
2016-09-05 15:28:56 +01:00
|
|
|
Route::get('settings', 'Admin\DefaultController@settings')->name('admin.settings');
|
2016-09-01 16:23:39 +01:00
|
|
|
|
2016-09-05 12:01:30 +01:00
|
|
|
// Album management
|
2016-10-28 05:30:57 +01:00
|
|
|
Route::get('albums/{id}/analyse/{queue_token}', 'Admin\AlbumController@analyse')->name('albums.analyse');
|
2016-09-01 16:23:39 +01:00
|
|
|
Route::get('albums/{id}/delete', 'Admin\AlbumController@delete')->name('albums.delete');
|
2017-02-16 17:32:01 +00:00
|
|
|
Route::post('albums/{id}/set-group-permissions', 'Admin\AlbumController@setGroupPermissions')->name('albums.set_group_permissions');
|
2017-02-17 11:38:10 +00:00
|
|
|
Route::post('albums/{id}/set-user-permissions', 'Admin\AlbumController@setGroupPermissions')->name('albums.set_user_permissions');
|
2016-09-01 16:23:39 +01:00
|
|
|
Route::resource('albums', 'Admin\AlbumController');
|
2016-09-05 12:01:30 +01:00
|
|
|
|
|
|
|
// Photo management
|
2016-10-28 05:30:57 +01:00
|
|
|
Route::post('photos/analyse/{id}/{queue_token}', 'Admin\PhotoController@analyse')->name('photos.analyse');
|
2016-10-03 15:57:58 +01:00
|
|
|
Route::post('photos/flip/{photoId}/{horizontal}/{vertical}', 'Admin\PhotoController@flip')->name('photos.flip');
|
2016-10-05 05:02:47 +01:00
|
|
|
Route::post('photos/move/{photoId}', 'Admin\PhotoController@move')->name('photos.move');
|
2016-10-05 05:35:14 +01:00
|
|
|
Route::post('photos/regenerate-thumbnails/{photoId}', 'Admin\PhotoController@regenerateThumbnails')->name('photos.regenerateThumbnails');
|
2016-09-08 23:22:29 +01:00
|
|
|
Route::post('photos/rotate/{photoId}/{angle}', 'Admin\PhotoController@rotate')->name('photos.rotate');
|
2016-09-05 12:56:13 +01:00
|
|
|
Route::post('photos/store-bulk', 'Admin\PhotoController@storeBulk')->name('photos.storeBulk');
|
2016-09-07 21:44:28 +01:00
|
|
|
Route::put('photos/update-bulk/{albumId}', 'Admin\PhotoController@updateBulk')->name('photos.updateBulk');
|
2016-09-02 21:27:50 +01:00
|
|
|
Route::resource('photos', 'Admin\PhotoController');
|
2016-09-24 09:34:08 +01:00
|
|
|
|
|
|
|
// Storage management
|
|
|
|
Route::get('storage/{id}/delete', 'Admin\StorageController@delete')->name('storage.delete');
|
|
|
|
Route::resource('storage', 'Admin\StorageController');
|
2016-10-01 15:24:22 +01:00
|
|
|
|
|
|
|
// User management
|
2017-02-13 10:36:53 +00:00
|
|
|
Route::get('users/{id}/delete', 'Admin\UserController@delete')->name('users.delete');
|
|
|
|
Route::resource('users', 'Admin\UserController');
|
|
|
|
|
|
|
|
// Group management
|
2017-02-13 12:08:16 +00:00
|
|
|
Route::get('groups/{id}/delete', 'Admin\GroupController@delete')->name('groups.delete');
|
2017-02-13 10:36:53 +00:00
|
|
|
Route::resource('groups', 'Admin\GroupController');
|
2016-09-03 22:13:05 +01:00
|
|
|
});
|
|
|
|
|
2016-10-01 14:45:48 +01:00
|
|
|
// Installation
|
|
|
|
Route::group(['prefix' => 'install'], function () {
|
|
|
|
Route::get('/administrator', 'InstallController@administrator')->name('install.administrator');
|
|
|
|
Route::post('/administrator', 'InstallController@administrator')->name('install.administrator');
|
|
|
|
Route::get('/check', 'InstallController@check')->name('install.check');
|
|
|
|
Route::post('/check', 'InstallController@check')->name('install.check');
|
|
|
|
Route::get('/database', 'InstallController@database')->name('install.database');
|
|
|
|
Route::post('/database', 'InstallController@database')->name('install.database');
|
|
|
|
});
|
|
|
|
|
2016-09-03 22:13:05 +01:00
|
|
|
// Gallery
|
|
|
|
Route::get('/', 'Gallery\DefaultController@index')->name('home');
|
2016-09-06 14:19:16 +01:00
|
|
|
Route::get('/activate/{token}', 'Auth\ActivateController@activate')->name('auth.activate');
|
2016-09-05 15:28:56 +01:00
|
|
|
Route::get('{albumUrlAlias}', 'Gallery\AlbumController@index')->name('viewAlbum');
|
|
|
|
Route::get('{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@show')->name('viewPhoto');
|
|
|
|
Route::get('photo/{albumUrlAlias}/{photoFilename}', 'Gallery\PhotoController@download')->name('downloadPhoto');
|