Skip to content

Commit

Permalink
further api rework
Browse files Browse the repository at this point in the history
  • Loading branch information
twof committed Oct 1, 2018
1 parent 43c5a02 commit 4adb1d2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Sources/CrudRouter/CrudController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ public struct CrudController<ModelT: Model & Content>: CrudControllerProtocol wh
/// - Parameter relation: Keypath from origin model to a Parent relation, which goes from origin model to
/// - Returns: relation controller, which retrieves models in relation to ModelType
public func crudRouterCollection<ParentType>(
forParent relation: KeyPath<ModelType, Parent<ModelType, ParentType>>,
at path: [PathComponentsRepresentable]
at path: PathComponentsRepresentable...,
forParent relation: KeyPath<ModelType, Parent<ModelType, ParentType>>
) -> CrudParentController<ModelType, ParentType> where
ParentType: Model & Content,
ModelType.Database == ParentType.Database,
Expand All @@ -87,8 +87,8 @@ public struct CrudController<ModelT: Model & Content>: CrudControllerProtocol wh
}

public func crudRouterCollection<ChildType>(
forChildren relation: KeyPath<ModelType, Children<ModelType, ChildType>>,
at path: [PathComponentsRepresentable]
at path: PathComponentsRepresentable...,
forChildren relation: KeyPath<ModelType, Children<ModelType, ChildType>>
) -> CrudChildrenController<ChildType, ModelType> where
ChildType: Model & Content,
ModelType.Database == ChildType.Database,
Expand All @@ -99,8 +99,8 @@ public struct CrudController<ModelT: Model & Content>: CrudControllerProtocol wh
}

public func crudRegister<ParentType>(
at path: PathComponentsRepresentable...,
forParent relation: KeyPath<ModelType, Parent<ModelType, ParentType>>,
at path: [PathComponentsRepresentable],
relationConfiguration: ((CrudParentController<ModelType, ParentType>) throws -> Void)?=nil
) throws where
ParentType: Model & Content,
Expand All @@ -114,8 +114,8 @@ public struct CrudController<ModelT: Model & Content>: CrudControllerProtocol wh
}

public func crudRegister<ChildType>(
at path: PathComponentsRepresentable...,
forChildren relation: KeyPath<ModelType, Children<ModelType, ChildType>>,
at path: [PathComponentsRepresentable],
relationConfiguration: ((CrudChildrenController<ChildType, ModelType>) throws -> Void)?=nil
) throws where
ChildType: Model & Content,
Expand Down

0 comments on commit 4adb1d2

Please sign in to comment.