Add Wunderlist migration (#46)
Complete migration flow Add migration in progress animation Add handling wunderlist migration flow Basic migration init structure Add migrator structure Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/46
This commit is contained in:
20
src/services/migrator/abstractMigrationService.js
Normal file
20
src/services/migrator/abstractMigrationService.js
Normal file
@ -0,0 +1,20 @@
|
||||
import AbstractService from '../abstractService'
|
||||
|
||||
// This service builds on top of the abstract service and basically just hides away method names.
|
||||
// It enables migration services to be created with minimal overhead and even better method names.
|
||||
export default class AbstractMigrationService extends AbstractService {
|
||||
constructor(serviceUrlKey) {
|
||||
super({
|
||||
update: '/migration/'+serviceUrlKey+'/migrate',
|
||||
get: '/migration/'+serviceUrlKey+'/auth',
|
||||
})
|
||||
}
|
||||
|
||||
getAuthUrl() {
|
||||
return this.get({})
|
||||
}
|
||||
|
||||
migrate(data) {
|
||||
return this.update(data)
|
||||
}
|
||||
}
|
7
src/services/migrator/wunderlist.js
Normal file
7
src/services/migrator/wunderlist.js
Normal file
@ -0,0 +1,7 @@
|
||||
import AbstractMigrationService from './abstractMigrationService'
|
||||
|
||||
export default class WunderlistMigrationService extends AbstractMigrationService {
|
||||
constructor() {
|
||||
super('wunderlist')
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user