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-16 09:51:39 +0100 |
commit | 713f2667c13326e25a57d9927eee873d51be033e (patch) | |
tree | 5d3bb7e2e663980901e4a8000e40b14270309c86 | |
parent | f88f3b747316c094040f005c17a18b3c129de95f (diff) | |
download | nextcloud-server-713f2667c13326e25a57d9927eee873d51be033e.tar.gz nextcloud-server-713f2667c13326e25a57d9927eee873d51be033e.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>
[skip ci]
-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 5b13f8d3fba..faabe5ba33a 100644 --- a/apps/files_sharing/src/views/SharingDetailsTab.vue +++ b/apps/files_sharing/src/views/SharingDetailsTab.vue @@ -822,9 +822,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 @@ -857,9 +855,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) { |