Add trello migration routes and status
This commit is contained in:
parent
0941b7e1dd
commit
12b985b023
@ -17,6 +17,7 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"code.vikunja.io/api/pkg/modules/migration/trello"
|
||||
"net/http"
|
||||
|
||||
"code.vikunja.io/api/pkg/log"
|
||||
@ -115,6 +116,10 @@ func Info(c echo.Context) error {
|
||||
m := &todoist.Migration{}
|
||||
info.AvailableMigrators = append(info.AvailableMigrators, m.Name())
|
||||
}
|
||||
if config.MigrationTrelloEnable.GetBool() {
|
||||
m := &trello.Migration{}
|
||||
info.AvailableMigrators = append(info.AvailableMigrators, m.Name())
|
||||
}
|
||||
|
||||
if config.BackgroundsEnabled.GetBool() {
|
||||
if config.BackgroundsUploadEnabled.GetBool() {
|
||||
|
@ -47,6 +47,7 @@
|
||||
package routes
|
||||
|
||||
import (
|
||||
"code.vikunja.io/api/pkg/modules/migration/trello"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@ -531,6 +532,16 @@ func registerAPIRoutes(a *echo.Group) {
|
||||
todoistMigrationHandler.RegisterRoutes(m)
|
||||
}
|
||||
|
||||
// Trello
|
||||
if config.MigrationTrelloEnable.GetBool() {
|
||||
trelloMigrationHandler := &migrationHandler.MigrationWeb{
|
||||
MigrationStruct: func() migration.Migrator {
|
||||
return &trello.Migration{}
|
||||
},
|
||||
}
|
||||
trelloMigrationHandler.RegisterRoutes(m)
|
||||
}
|
||||
|
||||
// List Backgrounds
|
||||
if config.BackgroundsEnabled.GetBool() {
|
||||
a.GET("/lists/:list/background", backgroundHandler.GetListBackground)
|
||||
|
Loading…
x
Reference in New Issue
Block a user