1
0

Make sure to use date objects everywhere where dealing with dates

This commit is contained in:
kolaente
2020-02-08 14:16:06 +01:00
parent fc17518e8c
commit 161f853361
31 changed files with 203 additions and 62 deletions

View File

@ -1,6 +1,7 @@
import AbstractService from './abstractService'
import UserListModel from '../models/userList'
import UserModel from '../models/user'
import moment from 'moment'
export default class UserListService extends AbstractService {
constructor() {
@ -12,6 +13,12 @@ export default class UserListService extends AbstractService {
})
}
processModel(model) {
model.created = moment(model.created).toISOString()
model.updated = moment(model.updated).toISOString()
return model
}
modelFactory(data) {
return new UserListModel(data)
}