Add Microsoft Todo migration (#737)
Add more logs Fix lint Generate docs Add swagger docs Add microsoft todo parsing logic go mod tidy Add basic test structure Add more fields to tasks rename microsoft todo package Add getting microsoft todo data Add structs and helper methods Add microsoft todo config and routes Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/737 Co-Authored-By: konrad <konrad@kola-entertainments.de> Co-Committed-By: konrad <konrad@kola-entertainments.de>
This commit is contained in:
@ -19,6 +19,8 @@ package v1
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
microsofttodo "code.vikunja.io/api/pkg/modules/migration/microsoft-todo"
|
||||
|
||||
"code.vikunja.io/api/pkg/modules/migration/trello"
|
||||
|
||||
"code.vikunja.io/api/pkg/log"
|
||||
@ -121,6 +123,10 @@ func Info(c echo.Context) error {
|
||||
m := &trello.Migration{}
|
||||
info.AvailableMigrators = append(info.AvailableMigrators, m.Name())
|
||||
}
|
||||
if config.MigrationMicrosoftTodoEnable.GetBool() {
|
||||
m := µsofttodo.Migration{}
|
||||
info.AvailableMigrators = append(info.AvailableMigrators, m.Name())
|
||||
}
|
||||
|
||||
if config.BackgroundsEnabled.GetBool() {
|
||||
if config.BackgroundsUploadEnabled.GetBool() {
|
||||
|
@ -50,6 +50,8 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
microsofttodo "code.vikunja.io/api/pkg/modules/migration/microsoft-todo"
|
||||
|
||||
"code.vikunja.io/api/pkg/modules/migration/trello"
|
||||
|
||||
"code.vikunja.io/api/pkg/config"
|
||||
@ -543,6 +545,16 @@ func registerAPIRoutes(a *echo.Group) {
|
||||
trelloMigrationHandler.RegisterRoutes(m)
|
||||
}
|
||||
|
||||
// Microsoft Todo
|
||||
if config.MigrationMicrosoftTodoEnable.GetBool() {
|
||||
microsoftTodoMigrationHandler := &migrationHandler.MigrationWeb{
|
||||
MigrationStruct: func() migration.Migrator {
|
||||
return µsofttodo.Migration{}
|
||||
},
|
||||
}
|
||||
microsoftTodoMigrationHandler.RegisterRoutes(m)
|
||||
}
|
||||
|
||||
// List Backgrounds
|
||||
if config.BackgroundsEnabled.GetBool() {
|
||||
a.GET("/lists/:list/background", backgroundHandler.GetListBackground)
|
||||
|
Reference in New Issue
Block a user