diff options
author | kondou <kondou@ts.unde.re> | 2013-08-26 16:46:55 +0200 |
---|---|---|
committer | kondou <kondou@ts.unde.re> | 2013-08-26 16:46:55 +0200 |
commit | 31736a1df36745467ad176ee1ffe442b87546012 (patch) | |
tree | 5d65ed5f890abc9c1e275dd382d037f3f52031d4 /core/routes.php | |
parent | 9a8908b643c69451118ab76ca36e5fa0e704bd0a (diff) | |
download | nextcloud-server-31736a1df36745467ad176ee1ffe442b87546012.tar.gz nextcloud-server-31736a1df36745467ad176ee1ffe442b87546012.zip |
Have a controller instead ofo avatar.php and fix some cropper-design
Diffstat (limited to 'core/routes.php')
-rw-r--r-- | core/routes.php | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/core/routes.php b/core/routes.php index dd8222d4378..150dbab9c10 100644 --- a/core/routes.php +++ b/core/routes.php @@ -57,6 +57,26 @@ $this->create('core_lostpassword_reset_password', '/lostpassword/reset/{token}/{ ->post() ->action('OC_Core_LostPassword_Controller', 'resetPassword'); +// Avatar routes +OC::$CLASSPATH['CoreAvatarController'] = 'core/avatar/controller.php'; +$this->create('core_avatar_get', '/avatar/{user}/{size}') + ->defaults(array('user' => '', 'size' => 64)) + ->get() + ->action('CoreAvatarController', 'getAvatar'); +$this->create('core_avatar_post', '/avatar/') + ->post() + ->action('CoreAvatarController', 'postAvatar'); +$this->create('core_avatar_delete', '/avatar/') + ->delete() + ->action('CoreAvatarController', 'deleteAvatar'); +$this->create('core_avatar_get_tmp', '/avatar/tmp/{size}') + ->defaults(array('size' => 64)) + ->get() + ->action('CoreAvatarController', 'getTmpAvatar'); +$this->create('core_avatar_post_cropped', '/avatar/cropped') + ->post() + ->action('CoreAvatarController', 'postCroppedAvatar'); + // Not specifically routed $this->create('app_css', '/apps/{app}/{file}') ->requirements(array('file' => '.*.css')) |