Multiple playgrounds support (#215)
* Add Playground struct and basic support for creating it and retrieving it * Add missing functions in pwd mock * Get playground from request domain and validate it exists. If valid set it on the newly created session. * Move playground specific configurations to the playground struct and use it everytime we need that conf. * Don't allow to specify a duration bigger that the allowed in the playground
This commit is contained in:
committed by
GitHub
parent
3dee0d3f0b
commit
3f5b3882dd
@@ -106,3 +106,15 @@ func (m *Mock) UserGet(id string) (*types.User, error) {
|
||||
args := m.Called(id)
|
||||
return args.Get(0).(*types.User), args.Error(1)
|
||||
}
|
||||
func (m *Mock) PlaygroundPut(playground *types.Playground) error {
|
||||
args := m.Called(playground)
|
||||
return args.Error(0)
|
||||
}
|
||||
func (m *Mock) PlaygroundGet(id string) (*types.Playground, error) {
|
||||
args := m.Called(id)
|
||||
return args.Get(0).(*types.Playground), args.Error(1)
|
||||
}
|
||||
func (m *Mock) PlaygroundGetAll() ([]*types.Playground, error) {
|
||||
args := m.Called()
|
||||
return args.Get(0).([]*types.Playground), args.Error(1)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user