Skip to content

Commit 3c3150b

Browse files
committed
fixup! feat: add example contact on first login
Signed-off-by: Hamza Mahjoubi <hamzamahjoubi221@gmail.com>
1 parent 6fdaf65 commit 3c3150b

File tree

105 files changed

+138
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+138
-134
lines changed

.reuse/dep5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ Files: apps/dav/tests/unit/test_fixtures/caldav-search-limit-timerange-1.ics app
167167
Copyright: 2023 Nextcloud GmbH and Nextcloud contributors
168168
License: AGPL-3.0-or-later
169169

170+
Files: apps/dav/lib/ExampleContentFiles/exampleContact.vcf
171+
Copyright: 2025 Nextcloud GmbH and Nextcloud contributors
172+
License: AGPL-3.0-or-later
173+
170174
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
171175
Copyright: 2011-2016 ownCloud, Inc., 2016-2024 Nextcloud GmbH and Nextcloud contributors
172176
License: AGPL-3.0-only OR AGPL-3.0-or-later

apps/dav/appinfo/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
['name' => 'invitation_response#options', 'url' => '/invitation/moreOptions/{token}', 'verb' => 'GET'],
1313
['name' => 'invitation_response#processMoreOptionsResult', 'url' => '/invitation/moreOptions/{token}', 'verb' => 'POST'],
1414
['name' => 'example_content#setDefaultContact', 'url' => '/api/defaultcontact/contact', 'verb' => 'PUT'],
15-
['name' => 'example_content#setAppConfig', 'url' => '/api/defaultcontact/config/{key}', 'verb' => 'PUT'],
15+
['name' => 'example_content#setEnableDefaultContact', 'url' => '/api/defaultcontact/config', 'verb' => 'PUT'],
1616
],
1717
'ocs' => [
1818
['name' => 'direct#getUrl', 'url' => '/api/v1/direct', 'verb' => 'POST'],

apps/dav/composer/composer/autoload_classmap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,10 @@
219219
'OCA\\DAV\\Connector\\Sabre\\ZipFolderPlugin' => $baseDir . '/../lib/Connector/Sabre/ZipFolderPlugin.php',
220220
'OCA\\DAV\\Controller\\BirthdayCalendarController' => $baseDir . '/../lib/Controller/BirthdayCalendarController.php',
221221
'OCA\\DAV\\Controller\\DirectController' => $baseDir . '/../lib/Controller/DirectController.php',
222+
'OCA\\DAV\\Controller\\ExampleContentController' => $baseDir . '/../lib/Controller/ExampleContentController.php',
222223
'OCA\\DAV\\Controller\\InvitationResponseController' => $baseDir . '/../lib/Controller/InvitationResponseController.php',
223224
'OCA\\DAV\\Controller\\OutOfOfficeController' => $baseDir . '/../lib/Controller/OutOfOfficeController.php',
224225
'OCA\\DAV\\Controller\\UpcomingEventsController' => $baseDir . '/../lib/Controller/UpcomingEventsController.php',
225-
'OCA\\DAV\\Controller\\ExampleContentController' => $baseDir . '/..' . '/../lib/Controller/ExampleContentController.php',
226226
'OCA\\DAV\\DAV\\CustomPropertiesBackend' => $baseDir . '/../lib/DAV/CustomPropertiesBackend.php',
227227
'OCA\\DAV\\DAV\\GroupPrincipalBackend' => $baseDir . '/../lib/DAV/GroupPrincipalBackend.php',
228228
'OCA\\DAV\\DAV\\PublicAuth' => $baseDir . '/../lib/DAV/PublicAuth.php',

apps/dav/composer/composer/autoload_static.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,10 @@ class ComposerStaticInitDAV
234234
'OCA\\DAV\\Connector\\Sabre\\ZipFolderPlugin' => __DIR__ . '/..' . '/../lib/Connector/Sabre/ZipFolderPlugin.php',
235235
'OCA\\DAV\\Controller\\BirthdayCalendarController' => __DIR__ . '/..' . '/../lib/Controller/BirthdayCalendarController.php',
236236
'OCA\\DAV\\Controller\\DirectController' => __DIR__ . '/..' . '/../lib/Controller/DirectController.php',
237+
'OCA\\DAV\\Controller\\ExampleContentController' => __DIR__ . '/..' . '/../lib/Controller/ExampleContentController.php',
237238
'OCA\\DAV\\Controller\\InvitationResponseController' => __DIR__ . '/..' . '/../lib/Controller/InvitationResponseController.php',
238239
'OCA\\DAV\\Controller\\OutOfOfficeController' => __DIR__ . '/..' . '/../lib/Controller/OutOfOfficeController.php',
239240
'OCA\\DAV\\Controller\\UpcomingEventsController' => __DIR__ . '/..' . '/../lib/Controller/UpcomingEventsController.php',
240-
'OCA\\DAV\\Controller\\ExampleContentController' => __DIR__ . '/..' . '/../lib/Controller/ExampleContentController.php',
241241
'OCA\\DAV\\DAV\\CustomPropertiesBackend' => __DIR__ . '/..' . '/../lib/DAV/CustomPropertiesBackend.php',
242242
'OCA\\DAV\\DAV\\GroupPrincipalBackend' => __DIR__ . '/..' . '/../lib/DAV/GroupPrincipalBackend.php',
243243
'OCA\\DAV\\DAV\\PublicAuth' => __DIR__ . '/..' . '/../lib/DAV/PublicAuth.php',

apps/dav/lib/Controller/ExampleContentController.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,9 @@ public function __construct(
3131
$this->appData = $this->appDataFactory->get('dav');
3232
}
3333

34-
35-
/**
36-
* update appconfig (admin setting)
37-
*
38-
* @param string allow the value to set
39-
*
40-
* @return JSONResponse an empty JSONResponse with respective http status code
41-
*/
42-
public function setAppConfig($key, $allow) {
43-
if ($allow === 'yes' && $key === 'enableDefaultContact' && !$this->defaultContactExists()) {
34+
public function setEnableDefaultContact($allow) {
35+
$key = 'enableDefaultContact' ;
36+
if ($allow === 'yes' && !$this->defaultContactExists()) {
4437
$this->setCard();
4538
}
4639
$this->config->setAppValue(Application::APP_ID, $key, $allow);

apps/dav/src/views/ExampleContactSettings.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export default {
9191
},
9292
methods: {
9393
updateEnableDefaultContact() {
94-
axios.put(generateUrl('apps/dav/api/defaultcontact/config/{key}', { key: 'enableDefaultContact' }), {
94+
axios.put(generateUrl('apps/dav/api/defaultcontact/config'), {
9595
allow: this.enableDefaultContact ? 'yes' : 'no',
9696
}).catch(() => {
9797
this.enableDefaultContact = !this.enableDefaultContact

dist/1191-1191.js.license

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ This file is generated from multiple sources. Included packages:
9696
- version: 11.1.0
9797
- license: MIT
9898
- axios
99-
- version: 1.7.9
99+
- version: 1.7.7
100100
- license: MIT
101101
- base64-js
102102
- version: 1.5.1

dist/1642-1642.js.license

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ This file is generated from multiple sources. Included packages:
6262
- version: 11.1.0
6363
- license: MIT
6464
- axios
65-
- version: 1.7.9
65+
- version: 1.7.7
6666
- license: MIT
6767
- base64-js
6868
- version: 1.5.1

dist/18-18.js.license

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ This file is generated from multiple sources. Included packages:
9999
- version: 2.2.1
100100
- license: GPL-3.0-or-later
101101
- @nextcloud/moment
102-
- version: 1.3.2
102+
- version: 1.3.1
103103
- license: GPL-3.0-or-later
104104
- @nextcloud/paths
105105
- version: 2.2.1
@@ -126,7 +126,7 @@ This file is generated from multiple sources. Included packages:
126126
- version: 11.1.0
127127
- license: MIT
128128
- axios
129-
- version: 1.7.9
129+
- version: 1.7.7
130130
- license: MIT
131131
- base64-js
132132
- version: 1.5.1

dist/2452-2452.js.license

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ This file is generated from multiple sources. Included packages:
5656
- version: 11.1.0
5757
- license: MIT
5858
- axios
59-
- version: 1.7.9
59+
- version: 1.7.7
6060
- license: MIT
6161
- base64-js
6262
- version: 1.5.1

0 commit comments

Comments
 (0)