diff options
author | fenn-cs <fenn25.fn@gmail.com> | 2024-03-19 00:10:56 +0100 |
---|---|---|
committer | fenn-cs <fenn25.fn@gmail.com> | 2024-04-08 12:25:48 +0100 |
commit | 9f84e723eb07a1c3bbcc7c0ca3362d9641729f43 (patch) | |
tree | 211f613c8e6e40e81b094f4ce20790606bf380f8 /apps | |
parent | 4c7e817d3306dcda8fd877b540586da3d55b8508 (diff) | |
download | nextcloud-server-9f84e723eb07a1c3bbcc7c0ca3362d9641729f43.tar.gz nextcloud-server-9f84e723eb07a1c3bbcc7c0ca3362d9641729f43.zip |
fix(share): Send empty expireDate when not expireDate set
When creating a new share, if the user unchecks "Set expiry date"
no `expireDate` is sent to the server.
However, the server then assumes the default configured, hence better
to send an empty value.
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/src/views/SharingDetailsTab.vue | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/files_sharing/src/views/SharingDetailsTab.vue b/apps/files_sharing/src/views/SharingDetailsTab.vue index a497b6b2d83..daeb6519ba9 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -796,9 +796,7 @@ export default { fileInfo: this.fileInfo, } - if (this.hasExpirationDate) { - incomingShare.expireDate = this.share.expireDate - } + incomingShare.expireDate = this.hasExpirationDate ? this.share.expireDate : '' if (this.isPasswordProtected) { incomingShare.password = this.share.password @@ -829,9 +827,9 @@ export default { shareWith: share.shareWith, permissions: share.permissions, attributes: JSON.stringify(fileInfo.shareAttributes), + expireDate: share.expireDate, ...(share.note ? { note: share.note } : {}), ...(share.password ? { password: share.password } : {}), - ...(share.expireDate ? { expireDate: share.expireDate } : {}), }) return resultingShare } catch (error) { |