diff --git a/resources/assets/scripts/app/controllers/account-albums-edit.coffee b/resources/assets/scripts/app/controllers/account-albums-edit.coffee index d7238650..1a99f97e 100644 --- a/resources/assets/scripts/app/controllers/account-albums-edit.coffee +++ b/resources/assets/scripts/app/controllers/account-albums-edit.coffee @@ -92,7 +92,7 @@ angular.module('ponyfm').controller "account-albums-edit", [ formData.append 'track_ids', _.map($scope.tracks, (t) -> t.id).join() xhr.open 'POST', url, true - xhr.setRequestHeader 'X-Token', pfm.token + xhr.setRequestHeader 'X-CSRF-Token', pfm.token $scope.isSaving = true xhr.send formData @@ -140,4 +140,4 @@ angular.module('ponyfm').controller "account-albums-edit", [ $scope.$on '$locationChangeStart', (e) -> return if !$scope.isDirty e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?') -] \ No newline at end of file +] diff --git a/resources/assets/scripts/app/controllers/account-settings.coffee b/resources/assets/scripts/app/controllers/account-settings.coffee index 871c0564..82a53ffb 100644 --- a/resources/assets/scripts/app/controllers/account-settings.coffee +++ b/resources/assets/scripts/app/controllers/account-settings.coffee @@ -51,7 +51,7 @@ angular.module('ponyfm').controller "account-settings", [ formData.append name, value xhr.open 'POST', '/api/web/account/settings/save', true - xhr.setRequestHeader 'X-Token', pfm.token + xhr.setRequestHeader 'X-CSRF-Token', pfm.token $scope.isSaving = true xhr.send formData @@ -60,4 +60,4 @@ angular.module('ponyfm').controller "account-settings", [ $scope.$on '$stateChangeStart', (e) -> return if $scope.selectedTrack == null || !$scope.isDirty e.preventDefault() if !confirm('Are you sure you want to leave this page without saving your changes?') -] \ No newline at end of file +] diff --git a/resources/assets/scripts/app/controllers/account-track.coffee b/resources/assets/scripts/app/controllers/account-track.coffee index 75a41bfa..d0065d82 100644 --- a/resources/assets/scripts/app/controllers/account-track.coffee +++ b/resources/assets/scripts/app/controllers/account-track.coffee @@ -100,7 +100,7 @@ angular.module('ponyfm').controller "account-track", [ formData.append 'show_song_ids', _.map(_.values($scope.selectedSongs), (s) -> s.id).join() xhr.open 'POST', '/api/web/tracks/edit/' + $scope.edit.id, true - xhr.setRequestHeader 'X-Token', pfm.token + xhr.setRequestHeader 'X-CSRF-Token', pfm.token $scope.isSaving = true xhr.send formData diff --git a/resources/assets/scripts/app/services/upload.coffee b/resources/assets/scripts/app/services/upload.coffee index b21ebcdf..d7ed71a0 100644 --- a/resources/assets/scripts/app/services/upload.coffee +++ b/resources/assets/scripts/app/services/upload.coffee @@ -46,6 +46,6 @@ angular.module('ponyfm').factory('upload', [ formData.append('track', file); xhr.open 'POST', '/api/web/tracks/upload', true - xhr.setRequestHeader 'X-Token', pfm.token + xhr.setRequestHeader 'X-CSRF-Token', pfm.token xhr.send formData -]) \ No newline at end of file +]) diff --git a/vagrant/config/app.php b/vagrant/config/app.php deleted file mode 100644 index d88079ec..00000000 --- a/vagrant/config/app.php +++ /dev/null @@ -1,15 +0,0 @@ - false, - 'uglify-js' => 'uglifyjs', - 'uglify-css' => 'uglifycss', - 'coffee' => 'coffee', - 'debug' => true, - 'url' => 'pony.fm.local', - 'files_directory' => '/vagrant-files/', - 'mlpma_directory' => '/vagrant-files/mlpma/', - 'node' => null, - 'node_paths' => ['/usr/lib/node_modules/'], - 'secure' => false, -); diff --git a/vagrant/config/cache.php b/vagrant/config/cache.php deleted file mode 100644 index 90116a11..00000000 --- a/vagrant/config/cache.php +++ /dev/null @@ -1,5 +0,0 @@ - 'database', -); diff --git a/vagrant/config/database.php b/vagrant/config/database.php deleted file mode 100644 index 064f000b..00000000 --- a/vagrant/config/database.php +++ /dev/null @@ -1,85 +0,0 @@ - 'mysql', - - /* - |-------------------------------------------------------------------------- - | Database Connections - |-------------------------------------------------------------------------- - | - | Here are each of the database connections setup for your application. - | Of course, examples of configuring each database platform that is - | supported by Laravel is shown below to make development simple. - | - | - | All database work in Laravel is done through the PHP PDO facilities - | so make sure you have the driver for your particular database of - | choice installed on your machine before you begin development. - | - */ - - 'connections' => array( - - 'mysql' => array( - 'driver' => 'mysql', - 'host' => 'localhost', - 'database' => 'homestead', - 'username' => 'homestead', - 'password' => 'secret', - 'charset' => 'utf8', - 'collation' => 'utf8_unicode_ci', - 'prefix' => '', - ), - - ), - - /* - |-------------------------------------------------------------------------- - | Migration Repository Table - |-------------------------------------------------------------------------- - | - | This table keeps track of all the migrations that have already run for - | your application. Using this information, we can determine which of - | the migrations on disk have not actually be run in the databases. - | - */ - - 'migrations' => 'migrations', - - /* - |-------------------------------------------------------------------------- - | Redis Databases - |-------------------------------------------------------------------------- - | - | Redis is an open source, fast, and advanced key-value store that also - | provides a richer set of commands than a typical key-value systems - | such as APC or Memcached. Laravel makes it easy to dig right in. - | - */ - - 'redis' => array( - - 'cluster' => true, - - 'default' => array( - 'host' => '127.0.0.1', - 'port' => 6379, - 'database' => 0, - ), - - ), - -); \ No newline at end of file diff --git a/vagrant/config/poniverse.php b/vagrant/config/poniverse.php deleted file mode 100644 index ffb31125..00000000 --- a/vagrant/config/poniverse.php +++ /dev/null @@ -1,12 +0,0 @@ - 1, - 'urls' => [ - 'api' => 'https://api.poniverse.net/v1/', - 'register' => 'https://poniverse.net/register?site=pony.fm', - 'auth' => 'https://poniverse.net/oauth/authorize', - 'token' => 'https://poniverse.net/oauth/access_token' - ], - 'client_id' => 'AAopdYDbn6JarV0Wo025gYQNxS1VXcj8GCa0raSC', - 'secret' => 'cxlA1jgGRZEPp8hg4VNB5v2gx7aY6DUtJSwUUHzT' -]; \ No newline at end of file diff --git a/vagrant/config/session.php b/vagrant/config/session.php deleted file mode 100644 index e11e98cd..00000000 --- a/vagrant/config/session.php +++ /dev/null @@ -1,125 +0,0 @@ - 'native', - - /* - |-------------------------------------------------------------------------- - | Session Lifetime - |-------------------------------------------------------------------------- - | - | Here you may specify the number of minutes that you wish the session - | to be allowed to remain idle for it is expired. If you want them - | to immediately expire when the browser closes, set it to zero. - | - */ - - 'lifetime' => 120, - - /* - |-------------------------------------------------------------------------- - | Session File Location - |-------------------------------------------------------------------------- - | - | When using the native session driver, we need a location where session - | files may be stored. A default has been set for you but a different - | location may be specified. This is only needed for file sessions. - | - */ - - 'files' => storage_path().'/sessions', - - /* - |-------------------------------------------------------------------------- - | Session Database Connection - |-------------------------------------------------------------------------- - | - | When using the "database" session driver, you may specify the database - | connection that should be used to manage your sessions. This should - | correspond to a connection in your "database" configuration file. - | - */ - - 'connection' => null, - - /* - |-------------------------------------------------------------------------- - | Session Database Table - |-------------------------------------------------------------------------- - | - | When using the "database" session driver, you may specify the table we - | should use to manage the sessions. Of course, a sensible default is - | provided for you; however, you are free to change this as needed. - | - */ - - 'table' => 'sessions', - - /* - |-------------------------------------------------------------------------- - | Session Sweeping Lottery - |-------------------------------------------------------------------------- - | - | Some session drivers must manually sweep their storage location to get - | rid of old sessions from storage. Here are the chances that it will - | happen on a given request. By default, the odds are 2 out of 100. - | - */ - - 'lottery' => array(2, 100), - - /* - |-------------------------------------------------------------------------- - | Session Cookie Name - |-------------------------------------------------------------------------- - | - | Here you may change the name of the cookie used to identify a session - | instance by ID. The name specified here will get used every time a - | new session cookie is created by the framework for every driver. - | - */ - - 'cookie' => 'laravel_session', - - /* - |-------------------------------------------------------------------------- - | Session Cookie Path - |-------------------------------------------------------------------------- - | - | The session cookie path determines the path for which the cookie will - | be regarded as available. Typically, this will be the root path of - | your application but you are free to change this when necessary. - | - */ - - 'path' => '/', - - /* - |-------------------------------------------------------------------------- - | Session Cookie Domain - |-------------------------------------------------------------------------- - | - | Here you may change the domain of the cookie used to identify a session - | in your application. This will determine which domains the cookie is - | available to in your application. A sensible default has been set. - | - */ - - 'domain' => null, - -); diff --git a/vagrant/install.sh b/vagrant/install.sh index f9c74e43..faf76bd7 100755 --- a/vagrant/install.sh +++ b/vagrant/install.sh @@ -23,7 +23,7 @@ else sudo make install fi -mkdir /vagrant/storage/logs/system +mkdir -p /vagrant/storage/logs/system /vagrant/vagrant/copy-and-restart-configs.sh cd /vagrant