mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
External Share API: Move url down one level in response
This commit is contained in:
parent
b2a1b54e9c
commit
43917e187b
4 changed files with 16 additions and 2 deletions
|
|
@ -20,5 +20,4 @@
|
|||
*
|
||||
*/
|
||||
OCP\API::register('post', '/cloud/files/share/{type}/{path}', array('OC_Sharing_API', 'shareFile'), 'files_sharing', OC_API::USER_AUTH, array(), array('type' => 'user|group|link|email|contact|remote', 'path' => '.*'));
|
||||
|
||||
?>
|
||||
|
|
@ -37,7 +37,8 @@ class OC_Sharing_API {
|
|||
}
|
||||
switch($type){
|
||||
case OCP\Share::SHARE_TYPE_LINK:
|
||||
return array('url' => OC_Helper::linkToPublic('files') . '&file=/' . OC_User::getUser() . '/files' . $path);
|
||||
$link = OC_Helper::linkToPublic('files') . '&file=/' . OC_User::getUser() . '/files' . $path;
|
||||
return array('link' => array('url' => $link));
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
13
apps/files_sharing/tests/api.php
Normal file
13
apps/files_sharing/tests/api.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* Copyright (c) 2012 Tom Needhama <tom@owncloud.com>
|
||||
* This file is licensed under the Affero General Public License version 3 or
|
||||
* later.
|
||||
* See the COPYING-README file.
|
||||
*/
|
||||
|
||||
class Test_Share_API extends UnitTestCase {
|
||||
|
||||
function test
|
||||
|
||||
}
|
||||
1
apps2
Submodule
1
apps2
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 5108f1f8c21117c164ca0627b22f322a5725154d
|
||||
Loading…
Reference in a new issue