From aa1aaab607013c5ec5b49d13764ceba8870eb338 Mon Sep 17 00:00:00 2001 From: "holger.trampe" Date: Sat, 31 Jul 2021 11:07:19 +0200 Subject: [PATCH] links angepasst --- appinfo/info.xml | 6 +++--- appinfo/routes.php | 4 ++-- lib/AppInfo/Application.php | 6 ++---- lib/Controller/AgencyController.php | 8 ++++++++ package-lock.json | 2 +- package.json | 2 +- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/appinfo/info.xml b/appinfo/info.xml index 82b72d2..86e7799 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -1,7 +1,7 @@ - agency + da_agency Agency App for managing Agency of DA @@ -13,10 +13,10 @@ - + diff --git a/appinfo/routes.php b/appinfo/routes.php index 00ead3f..ce4f662 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -12,8 +12,8 @@ return [ ['name' => 'agency#updateagencygroupcontributors', 'url' => '/updateagencygroupcontributors/{gid}', 'verb' => 'PUT'], ['name' => 'agency#updateagencygroup', 'url' => '/updateagencygroup', 'verb' => 'POST'], ['name' => 'agency#deleteagencygroup', 'url' => '/delagencygroup', 'verb' => 'POST'], - - + //['name' => 'agency#getlogdata', 'url' => '/getdata', 'verb' => 'GET'], + # GROUPS ['name' => 'group#getagencygroups', 'url' => '/getagencygroups', 'verb' => 'GET'], ['name' => 'group#addagencygroup', 'url' => '/addagencygroup', 'verb' => 'PUT'], diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index e628ede..e25cc81 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -10,7 +10,6 @@ use OCP\IUserSession; use OCP\AppFramework\Controller; use OCP\IRequest; - class Application extends App { protected $AppName = 'Agency'; @@ -24,9 +23,7 @@ class Application extends App { # ADding the Event, that User has Changed - update the logged User by Django. Works only by personal informations of the User! $dispatcher->addServiceListener(UserChangedEvent::class, UserChangedByNC::class); - } - } /* @@ -37,6 +34,7 @@ class UserChangedByNC extends Controller { protected $session; protected $request; private $nclink = 'https://test.app.digitale-agentur.com'; + //private $nclink = 'http://host.docker.internal:8000'; public function __construct(string $AppName, IRequest $request, IUserSession $session) { $this->request = $request; @@ -53,7 +51,6 @@ class UserChangedByNC extends Controller { ]; $context = stream_context_create($opts); $file = file_get_contents($this->nclink.'/api/uschanged/'.$this->session->getUser()->getUID().'/'.$this->request->getCookie('nc_session_id'), false, $context); - } } @@ -66,6 +63,7 @@ class LogoutByNC extends Controller { protected $session; private $nclink = 'https://test.app.digitale-agentur.com'; + //private $nclink = 'http://host.docker.internal:8000'; public function __construct(string $AppName, IRequest $request, IUserSession $session) { parent::__construct($AppName, $request); diff --git a/lib/Controller/AgencyController.php b/lib/Controller/AgencyController.php index 6881dc1..25aab60 100644 --- a/lib/Controller/AgencyController.php +++ b/lib/Controller/AgencyController.php @@ -144,6 +144,14 @@ class AgencyController extends Controller { //return "OK!"; } + /** + * @PublicPage + * @NoCSRFRequired + * + */ + public function getlogdata(){ + return "THIS IS AWESOME"; + } } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 67fcb26..8512aac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "agency", + "name": "da_agency", "version": "0.0.1", "lockfileVersion": 1, "requires": true, diff --git a/package.json b/package.json index 70b8c86..65f51aa 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "agency", + "name": "da_agency", "description": "App for managing Agency of DA", "version": "0.0.1", "author": "Holger Trampe",