Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.mdns.eu/nextcloud/passwords-client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius David Wieschollek <passwords.public@mdns.eu>2021-02-27 22:26:07 +0300
committerMarius David Wieschollek <passwords.public@mdns.eu>2021-02-27 22:26:07 +0300
commit5caa85464d3dd3a1d0e2496db20654efc382fbbb (patch)
treee24476dcc9423eed29e7e0c4f833705573497be9
parent6a9fd754158d0c5acd84534f597dd2e472dd54a0 (diff)
Convert Date attributes to timestamp before sending to server
Signed-off-by: Marius David Wieschollek <passwords.public@mdns.eu>
-rw-r--r--src/Converter/AbstractConverter.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Converter/AbstractConverter.js b/src/Converter/AbstractConverter.js
index acc7bb7..8022403 100644
--- a/src/Converter/AbstractConverter.js
+++ b/src/Converter/AbstractConverter.js
@@ -114,6 +114,10 @@ export default class AbstractConverter {
for(let key in data) {
if(!properties.hasOwnProperty(key) || !properties[key].writeable) {
delete data[key];
+ continue;
+ }
+ if(properties.hasOwnProperty(key) && properties[key].type === 'date' && data[key] instanceof Date) {
+ data[key] = Math.round(data[key].getTime() / 1000);
}
}