Skip to content

Commit

Permalink
fixup! feat: add example contact on first login
Browse files Browse the repository at this point in the history
Signed-off-by: Hamza Mahjoubi <[email protected]>
  • Loading branch information
hamza221 committed Jan 28, 2025
1 parent 6fdaf65 commit 3c3150b
Show file tree
Hide file tree
Showing 105 changed files with 138 additions and 134 deletions.
4 changes: 4 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ Files: apps/dav/tests/unit/test_fixtures/caldav-search-limit-timerange-1.ics app
Copyright: 2023 Nextcloud GmbH and Nextcloud contributors
License: AGPL-3.0-or-later

Files: apps/dav/lib/ExampleContentFiles/exampleContact.vcf
Copyright: 2025 Nextcloud GmbH and Nextcloud contributors
License: AGPL-3.0-or-later

Files: composer.json composer.lock .github/CODEOWNERS __tests__/tsconfig.json tsconfig.json build/integration/composer.* vendor-bin/*/composer.json vendor-bin/*/composer.lock apps/*/composer/composer.json apps/*/composer/composer.lock apps/*/composer/composer/installed.json
Copyright: 2011-2016 ownCloud, Inc., 2016-2024 Nextcloud GmbH and Nextcloud contributors
License: AGPL-3.0-only OR AGPL-3.0-or-later
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
['name' => 'invitation_response#options', 'url' => '/invitation/moreOptions/{token}', 'verb' => 'GET'],
['name' => 'invitation_response#processMoreOptionsResult', 'url' => '/invitation/moreOptions/{token}', 'verb' => 'POST'],
['name' => 'example_content#setDefaultContact', 'url' => '/api/defaultcontact/contact', 'verb' => 'PUT'],
['name' => 'example_content#setAppConfig', 'url' => '/api/defaultcontact/config/{key}', 'verb' => 'PUT'],
['name' => 'example_content#setEnableDefaultContact', 'url' => '/api/defaultcontact/config', 'verb' => 'PUT'],
],
'ocs' => [
['name' => 'direct#getUrl', 'url' => '/api/v1/direct', 'verb' => 'POST'],
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/composer/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@
'OCA\\DAV\\Connector\\Sabre\\ZipFolderPlugin' => $baseDir . '/../lib/Connector/Sabre/ZipFolderPlugin.php',
'OCA\\DAV\\Controller\\BirthdayCalendarController' => $baseDir . '/../lib/Controller/BirthdayCalendarController.php',
'OCA\\DAV\\Controller\\DirectController' => $baseDir . '/../lib/Controller/DirectController.php',
'OCA\\DAV\\Controller\\ExampleContentController' => $baseDir . '/../lib/Controller/ExampleContentController.php',
'OCA\\DAV\\Controller\\InvitationResponseController' => $baseDir . '/../lib/Controller/InvitationResponseController.php',
'OCA\\DAV\\Controller\\OutOfOfficeController' => $baseDir . '/../lib/Controller/OutOfOfficeController.php',
'OCA\\DAV\\Controller\\UpcomingEventsController' => $baseDir . '/../lib/Controller/UpcomingEventsController.php',
'OCA\\DAV\\Controller\\ExampleContentController' => $baseDir . '/..' . '/../lib/Controller/ExampleContentController.php',
'OCA\\DAV\\DAV\\CustomPropertiesBackend' => $baseDir . '/../lib/DAV/CustomPropertiesBackend.php',
'OCA\\DAV\\DAV\\GroupPrincipalBackend' => $baseDir . '/../lib/DAV/GroupPrincipalBackend.php',
'OCA\\DAV\\DAV\\PublicAuth' => $baseDir . '/../lib/DAV/PublicAuth.php',
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@ class ComposerStaticInitDAV
'OCA\\DAV\\Connector\\Sabre\\ZipFolderPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/ZipFolderPlugin.php',
'OCA\\DAV\\Controller\\BirthdayCalendarController' => __DIR__ . '/..' . '/../lib/Controller/BirthdayCalendarController.php',
'OCA\\DAV\\Controller\\DirectController' => __DIR__ . '/..' . '/../lib/Controller/DirectController.php',
'OCA\\DAV\\Controller\\ExampleContentController' => __DIR__ . '/..' . '/../lib/Controller/ExampleContentController.php',
'OCA\\DAV\\Controller\\InvitationResponseController' => __DIR__ . '/..' . '/../lib/Controller/InvitationResponseController.php',
'OCA\\DAV\\Controller\\OutOfOfficeController' => __DIR__ . '/..' . '/../lib/Controller/OutOfOfficeController.php',
'OCA\\DAV\\Controller\\UpcomingEventsController' => __DIR__ . '/..' . '/../lib/Controller/UpcomingEventsController.php',
'OCA\\DAV\\Controller\\ExampleContentController' => __DIR__ . '/..' . '/../lib/Controller/ExampleContentController.php',
'OCA\\DAV\\DAV\\CustomPropertiesBackend' => __DIR__ . '/..' . '/../lib/DAV/CustomPropertiesBackend.php',
'OCA\\DAV\\DAV\\GroupPrincipalBackend' => __DIR__ . '/..' . '/../lib/DAV/GroupPrincipalBackend.php',
'OCA\\DAV\\DAV\\PublicAuth' => __DIR__ . '/..' . '/../lib/DAV/PublicAuth.php',
Expand Down
13 changes: 3 additions & 10 deletions apps/dav/lib/Controller/ExampleContentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,9 @@ public function __construct(
$this->appData = $this->appDataFactory->get('dav');
}


/**
* update appconfig (admin setting)
*
* @param string allow the value to set
*
* @return JSONResponse an empty JSONResponse with respective http status code
*/
public function setAppConfig($key, $allow) {
if ($allow === 'yes' && $key === 'enableDefaultContact' && !$this->defaultContactExists()) {
public function setEnableDefaultContact($allow) {
$key = 'enableDefaultContact' ;
if ($allow === 'yes' && !$this->defaultContactExists()) {
$this->setCard();
}
$this->config->setAppValue(Application::APP_ID, $key, $allow);
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/src/views/ExampleContactSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default {
},
methods: {
updateEnableDefaultContact() {
axios.put(generateUrl('apps/dav/api/defaultcontact/config/{key}', { key: 'enableDefaultContact' }), {
axios.put(generateUrl('apps/dav/api/defaultcontact/config'), {
allow: this.enableDefaultContact ? 'yes' : 'no',
}).catch(() => {
this.enableDefaultContact = !this.enableDefaultContact
Expand Down
2 changes: 1 addition & 1 deletion dist/1191-1191.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ This file is generated from multiple sources. Included packages:
- version: 11.1.0
- license: MIT
- axios
- version: 1.7.9
- version: 1.7.7
- license: MIT
- base64-js
- version: 1.5.1
Expand Down
2 changes: 1 addition & 1 deletion dist/1642-1642.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ This file is generated from multiple sources. Included packages:
- version: 11.1.0
- license: MIT
- axios
- version: 1.7.9
- version: 1.7.7
- license: MIT
- base64-js
- version: 1.5.1
Expand Down
4 changes: 2 additions & 2 deletions dist/18-18.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ This file is generated from multiple sources. Included packages:
- version: 2.2.1
- license: GPL-3.0-or-later
- @nextcloud/moment
- version: 1.3.2
- version: 1.3.1
- license: GPL-3.0-or-later
- @nextcloud/paths
- version: 2.2.1
Expand All @@ -126,7 +126,7 @@ This file is generated from multiple sources. Included packages:
- version: 11.1.0
- license: MIT
- axios
- version: 1.7.9
- version: 1.7.7
- license: MIT
- base64-js
- version: 1.5.1
Expand Down
2 changes: 1 addition & 1 deletion dist/2452-2452.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This file is generated from multiple sources. Included packages:
- version: 11.1.0
- license: MIT
- axios
- version: 1.7.9
- version: 1.7.7
- license: MIT
- base64-js
- version: 1.5.1
Expand Down
2 changes: 1 addition & 1 deletion dist/3920-3920.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.0.7
- license: MIT
- axios
- version: 1.7.9
- version: 1.7.7
- license: MIT
- balanced-match
- version: 1.0.2
Expand Down
2 changes: 1 addition & 1 deletion dist/465-465.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ This file is generated from multiple sources. Included packages:
- version: 11.1.0
- license: MIT
- axios
- version: 1.7.9
- version: 1.7.7
- license: MIT
- bail
- version: 2.0.2
Expand Down
2 changes: 1 addition & 1 deletion dist/5203-5203.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ This file is generated from multiple sources. Included packages:
- version: 11.1.0
- license: MIT
- axios
- version: 1.7.9
- version: 1.7.7
- license: MIT
- base64-js
- version: 1.5.1
Expand Down
2 changes: 0 additions & 2 deletions dist/5266-5266.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/5266-5266.js.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/5266-5266.js.map.license

This file was deleted.

2 changes: 1 addition & 1 deletion dist/5528-5528.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ This file is generated from multiple sources. Included packages:
- version: 11.1.0
- license: MIT
- axios
- version: 1.7.9
- version: 1.7.7
- license: MIT
- bail
- version: 2.0.2
Expand Down
2 changes: 1 addition & 1 deletion dist/5531-5531.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ This file is generated from multiple sources. Included packages:
- version: 1.0.7
- license: MIT
- axios
- version: 1.7.9
- version: 1.7.7
- license: MIT
- balanced-match
- version: 1.0.2
Expand Down
2 changes: 2 additions & 0 deletions dist/5828-5828.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions dist/8320-8320.js.license → dist/5828-5828.js.license
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ SPDX-FileCopyrightText: Matt Zabriskie
SPDX-FileCopyrightText: Joyent
SPDX-FileCopyrightText: Jonas Schade <[email protected]>
SPDX-FileCopyrightText: John-David Dalton <[email protected]> (http://allyoucanleet.com/)
SPDX-FileCopyrightText: John Molakvoæ <[email protected]>
SPDX-FileCopyrightText: John Molakvoæ (skjnldsv) <[email protected]>
SPDX-FileCopyrightText: Guillaume Chau <[email protected]>
SPDX-FileCopyrightText: GitHub Inc.
Expand Down Expand Up @@ -87,7 +88,7 @@ This file is generated from multiple sources. Included packages:
- version: 8.0.1
- license: MIT
- @nextcloud/upload
- version: 1.8.0
- version: 1.7.0
- license: AGPL-3.0-or-later
- @nextcloud/vue
- version: 8.22.0
Expand All @@ -102,7 +103,7 @@ This file is generated from multiple sources. Included packages:
- version: 4.5.0
- license: Apache-2.0
- axios
- version: 1.7.9
- version: 1.7.7
- license: MIT
- base64-js
- version: 1.5.1
Expand Down
Loading

0 comments on commit 3c3150b

Please sign in to comment.