vikunja-frontend/src/services/caldavToken.js
2022-04-02 17:37:50 +02:00

23 lines
No EOL
529 B
JavaScript

import {formatISO} from 'date-fns'
import CaldavTokenModel from '../models/caldavToken'
import AbstractService from './abstractService'
export default class CaldavTokenService extends AbstractService {
constructor() {
super({
getAll: '/user/settings/token/caldav',
create: '/user/settings/token/caldav',
delete: '/user/settings/token/caldav/{id}',
})
}
processModel(model) {
model.created = formatISO(new Date(model.created))
return model
}
modelFactory(data) {
return new CaldavTokenModel(data)
}
}