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