aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/ReferenceApiController.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/Controller/ReferenceApiController.php')
-rw-r--r--core/Controller/ReferenceApiController.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/Controller/ReferenceApiController.php b/core/Controller/ReferenceApiController.php
index 3ecd9917b23..b9706796460 100644
--- a/core/Controller/ReferenceApiController.php
+++ b/core/Controller/ReferenceApiController.php
@@ -57,6 +57,16 @@ class ReferenceApiController extends \OCP\AppFramework\OCSController {
]);
}
+ /**
+ * @NoAdminRequired
+ */
+ public function resolveOne(string $reference): DataResponse {
+ $resolvedReference = $this->referenceManager->resolveReference($reference);
+
+ $response = new DataResponse(['references' => [ $reference => $resolvedReference ]]);
+ $response->cacheFor(3600, false, true);
+ return $response;
+ }
/**
* @NoAdminRequired