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.
2022-09-06 09:36:01 +00:00
|
|
|
import AbstractService from './abstractService'
|
|
|
|
import UserListModel from '@/models/userList'
|
|
|
|
import type {IUserList} from '@/modelTypes/IUserList'
|
|
|
|
import UserModel from '@/models/user'
|
|
|
|
|
2022-07-21 16:56:31 +00:00
|
|
|
export default class UserListService extends AbstractService<IUserList> {
|
2019-03-02 10:25:10 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
2020-04-12 21:54:46 +00:00
|
|
|
create: '/lists/{listId}/users',
|
|
|
|
getAll: '/lists/{listId}/users',
|
|
|
|
update: '/lists/{listId}/users/{userId}',
|
|
|
|
delete: '/lists/{listId}/users/{userId}',
|
2019-03-02 10:25:10 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
modelFactory(data) {
|
|
|
|
return new UserListModel(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
modelGetAllFactory(data) {
|
|
|
|
return new UserModel(data)
|
|
|
|
}
|
|
|
|
}
|