feat(migration): add routes for TickTick migrator

This commit is contained in:
kolaente 2022-10-09 18:56:37 +02:00
parent e5394d6d4b
commit 3af9855148
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -47,6 +47,7 @@
package routes package routes
import ( import (
"code.vikunja.io/api/pkg/modules/migration/ticktick"
"errors" "errors"
"fmt" "fmt"
"net/url" "net/url"
@ -655,12 +656,21 @@ func registerMigrations(m *echo.Group) {
microsoftTodoMigrationHandler.RegisterRoutes(m) microsoftTodoMigrationHandler.RegisterRoutes(m)
} }
// Vikunja File Migrator
vikunjaFileMigrationHandler := &migrationHandler.FileMigratorWeb{ vikunjaFileMigrationHandler := &migrationHandler.FileMigratorWeb{
MigrationStruct: func() migration.FileMigrator { MigrationStruct: func() migration.FileMigrator {
return &vikunja_file.FileMigrator{} return &vikunja_file.FileMigrator{}
}, },
} }
vikunjaFileMigrationHandler.RegisterRoutes(m) vikunjaFileMigrationHandler.RegisterRoutes(m)
// TickTick File Migrator
tickTickFileMigrator := migrationHandler.FileMigratorWeb{
MigrationStruct: func() migration.FileMigrator {
return &ticktick.Migrator{}
},
}
tickTickFileMigrator.RegisterRoutes(m)
} }
func registerCalDavRoutes(c *echo.Group) { func registerCalDavRoutes(c *echo.Group) {