1
0

Migration Improvements (#47)

Make "migration" "import everywhere"

Add checking for migration status before trying to migrate

Add get status from migrations

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/47
This commit is contained in:
konrad
2020-01-20 21:22:32 +00:00
parent 9b232c7d4f
commit d61a7511da
4 changed files with 50 additions and 9 deletions

View File

@ -3,15 +3,21 @@ 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 {
serviceUrlKey = ''
constructor(serviceUrlKey) {
super({
update: '/migration/'+serviceUrlKey+'/migrate',
get: '/migration/'+serviceUrlKey+'/auth',
})
this.serviceUrlKey = serviceUrlKey
}
getAuthUrl() {
return this.get({})
return this.getM('/migration/'+this.serviceUrlKey+'/auth')
}
getStatus() {
return this.getM('/migration/'+this.serviceUrlKey+'/status')
}
migrate(data) {