summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-02-15 16:13:10 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-03-08 19:43:13 +0100
commit843524be0f8b988f38bcbe28b4acceee2b9199d5 (patch)
tree90f5c77e24a7b29768a03eb28a031f4943778046 /application
parenta42710bebd493c573ce700628ff76fdb22926d4f (diff)
api/file/create_multipase: return URL
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-rw-r--r--application/controllers/api/v1/api_info.php2
-rw-r--r--application/service/files.php1
-rw-r--r--application/tests/test_api_v1.php3
3 files changed, 4 insertions, 2 deletions
diff --git a/application/controllers/api/v1/api_info.php b/application/controllers/api/v1/api_info.php
index 3feaadfda..e5e99f771 100644
--- a/application/controllers/api/v1/api_info.php
+++ b/application/controllers/api/v1/api_info.php
@@ -11,6 +11,6 @@ namespace controllers\api\v1;
class api_info extends \controllers\api\api_controller {
static public function get_version()
{
- return "1.0.0";
+ return "1.1.0";
}
}
diff --git a/application/service/files.php b/application/service/files.php
index 1097c5201..15361227c 100644
--- a/application/service/files.php
+++ b/application/service/files.php
@@ -279,6 +279,7 @@ class files {
return array(
"url_id" => $url_id,
+ "url" => site_url($url_id)."/",
);
}
diff --git a/application/tests/test_api_v1.php b/application/tests/test_api_v1.php
index 44b559852..3dcca0728 100644
--- a/application/tests/test_api_v1.php
+++ b/application/tests/test_api_v1.php
@@ -23,7 +23,7 @@ class test_api_v1 extends Test {
private function uploadFile($apikey, $file)
{
- $ret = $this->CallAPI("POST", "$this->server/api/v1.0.0/file/upload", array(
+ $ret = $this->CallAPI("POST", "$this->server/api/v1.1.0/file/upload", array(
"apikey" => $apikey,
"file[1]" => curl_file_create($file),
));
@@ -310,6 +310,7 @@ class test_api_v1 extends Test {
$this->expectSuccess("create multipaste", $ret);
$this->t->isnt($ret["data"]["url_id"], "", "got a multipaste ID");
+ $this->t->isnt($ret["data"]["url"], "", "got a multipaste URL");
}
public function test_create_multipaste_errorOnWrongID()