4a413e7f3c
Change all snake/camelCase mix and match to camelCase everywhere Fix conversion to not interfer with service interceptors Add dynamic conversion between camelCase and snake_case to services Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/105
21 lines
No EOL
479 B
JavaScript
21 lines
No EOL
479 B
JavaScript
import AbstractService from './abstractService'
|
|
import TaskAssigneeModel from '../models/taskAssignee'
|
|
import {formatISO} from 'date-fns'
|
|
|
|
export default class TaskAssigneeService extends AbstractService {
|
|
constructor() {
|
|
super({
|
|
create: '/tasks/{taskId}/assignees',
|
|
delete: '/tasks/{taskId}/assignees/{userId}',
|
|
})
|
|
}
|
|
|
|
processModel(model) {
|
|
model.created = formatISO(model.created)
|
|
return model
|
|
}
|
|
|
|
modelFactory(data) {
|
|
return new TaskAssigneeModel(data)
|
|
}
|
|
} |