Add Vikunja version to export

This commit is contained in:
kolaente 2021-08-29 19:32:55 +02:00
parent 1838e48e72
commit 7f7377085f
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 6 additions and 0 deletions

View File

@ -24,6 +24,7 @@ import (
"code.vikunja.io/api/pkg/files"
"code.vikunja.io/api/pkg/modules/dump"
"code.vikunja.io/api/pkg/user"
"code.vikunja.io/api/pkg/version"
"encoding/json"
"fmt"
"io"
@ -73,6 +74,11 @@ func ExportUserData(u *user.User) (err error) {
if err != nil {
return err
}
// Vikunja Version
err = dump.WriteBytesToZip("VERSION", []byte(version.Version), dumpWriter)
if err != nil {
return err
}
// Pack it in a zip file and save it