08dcc77228
See vikunja/api/commit/eb3a94567817b78a3325a937cedce237837e3785
21 lines
No EOL
509 B
JavaScript
21 lines
No EOL
509 B
JavaScript
import AbstractService from './abstractService'
|
|
import TaskRelationModel from '../models/taskRelation'
|
|
import {formatISO} from 'date-fns'
|
|
|
|
export default class TaskRelationService extends AbstractService {
|
|
constructor() {
|
|
super({
|
|
create: '/tasks/{taskId}/relations',
|
|
delete: '/tasks/{taskId}/relations/{relationKind}/{otherTaskId}',
|
|
})
|
|
}
|
|
|
|
processModel(model) {
|
|
model.created = formatISO(new Date(model.created))
|
|
return model
|
|
}
|
|
|
|
modelFactory(data) {
|
|
return new TaskRelationModel(data)
|
|
}
|
|
} |