Add list duplicate (#172)
Add list duplicate Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/172
This commit is contained in:
20
src/services/listDuplicateService.js
Normal file
20
src/services/listDuplicateService.js
Normal file
@ -0,0 +1,20 @@
|
||||
import AbstractService from './abstractService'
|
||||
import listDuplicateModel from '../models/listDuplicateModel'
|
||||
|
||||
export default class ListDuplicateService extends AbstractService {
|
||||
constructor() {
|
||||
super({
|
||||
create: '/lists/{listId}/duplicate',
|
||||
})
|
||||
}
|
||||
|
||||
beforeCreate(model) {
|
||||
|
||||
model.list = null
|
||||
return model
|
||||
}
|
||||
|
||||
modelFactory(data) {
|
||||
return new listDuplicateModel(data)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user