Преглед изворни кода

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>
tags/v27.1.9rc1
fenn-cs пре 2 месеци
родитељ
комит
9f84e723eb
1 измењених фајлова са 2 додато и 4 уклоњено
  1. 2
    4
      apps/files_sharing/src/views/SharingDetailsTab.vue

+ 2
- 4
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) {

Loading…
Откажи
Сачувај