Added a team namespace service/model
All checks were successful
the build was successful

This commit is contained in:
konrad 2019-02-24 17:57:45 +01:00
parent 785cb149f3
commit bd4c4483cb
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 25 additions and 1 deletions

View File

@ -8,10 +8,12 @@ export default class TeamModel extends AbstractModel {
defaults() {
return {
id: 0,
createdBy: {},
name: '',
description: '',
members: [],
right: 0,
createdBy: {},
created: 0,
updated: 0
}

View File

@ -0,0 +1,22 @@
import AbstractService from './abstractService'
import TeamNamespaceModel from '../models/teamNamespace'
import TeamModel from '../models/team'
export default class TeamNamespaceService extends AbstractService {
constructor() {
super({
create: '/namespaces/{namespaceID}/teams',
getAll: '/namespaces/{namespaceID}/teams',
update: '/namespaces/{namespaceID}/teams/{teamID}',
delete: '/namespaces/{namespaceID}/teams/{teamID}',
})
}
modelFactory(data) {
return new TeamNamespaceModel(data)
}
modelGetAllFactory(data) {
return new TeamModel(data)
}
}