This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
2020-06-30 20:53:25 +00:00
|
|
|
import AbstractService from './abstractService'
|
2022-09-06 09:36:01 +00:00
|
|
|
import listDuplicateModel from '@/models/listDuplicateModel'
|
|
|
|
import type {IListDuplicate} from '@/modelTypes/IListDuplicate'
|
2020-06-30 20:53:25 +00:00
|
|
|
|
2022-07-21 16:56:31 +00:00
|
|
|
export default class ListDuplicateService extends AbstractService<IListDuplicate> {
|
2020-06-30 20:53:25 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
create: '/lists/{listId}/duplicate',
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
beforeCreate(model) {
|
|
|
|
|
|
|
|
model.list = null
|
|
|
|
return model
|
|
|
|
}
|
|
|
|
|
|
|
|
modelFactory(data) {
|
|
|
|
return new listDuplicateModel(data)
|
|
|
|
}
|
|
|
|
}
|