forked from vikunja/frontend
konrad
f4c552a79f
Co-authored-by: kolaente <k@knt.li> Reviewed-on: vikunja/frontend#699 Co-authored-by: konrad <k@knt.li> Co-committed-by: konrad <k@knt.li>
26 lines
700 B
JavaScript
26 lines
700 B
JavaScript
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',
|
|
})
|
|
this.serviceUrlKey = serviceUrlKey
|
|
}
|
|
|
|
getAuthUrl() {
|
|
return this.getM('/migration/' + this.serviceUrlKey + '/auth')
|
|
}
|
|
|
|
getStatus() {
|
|
return this.getM('/migration/' + this.serviceUrlKey + '/status')
|
|
}
|
|
|
|
migrate(data) {
|
|
return this.update(data)
|
|
}
|
|
} |