From 4adb1d2f396564c588631e762676bee756250c2e Mon Sep 17 00:00:00 2001 From: twof Date: Mon, 1 Oct 2018 13:18:53 -0700 Subject: [PATCH] further api rework --- Sources/CrudRouter/CrudController.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Sources/CrudRouter/CrudController.swift b/Sources/CrudRouter/CrudController.swift index f57895e..a9bfb12 100644 --- a/Sources/CrudRouter/CrudController.swift +++ b/Sources/CrudRouter/CrudController.swift @@ -75,8 +75,8 @@ public struct CrudController: 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( - forParent relation: KeyPath>, - at path: [PathComponentsRepresentable] + at path: PathComponentsRepresentable..., + forParent relation: KeyPath> ) -> CrudParentController where ParentType: Model & Content, ModelType.Database == ParentType.Database, @@ -87,8 +87,8 @@ public struct CrudController: CrudControllerProtocol wh } public func crudRouterCollection( - forChildren relation: KeyPath>, - at path: [PathComponentsRepresentable] + at path: PathComponentsRepresentable..., + forChildren relation: KeyPath> ) -> CrudChildrenController where ChildType: Model & Content, ModelType.Database == ChildType.Database, @@ -99,8 +99,8 @@ public struct CrudController: CrudControllerProtocol wh } public func crudRegister( + at path: PathComponentsRepresentable..., forParent relation: KeyPath>, - at path: [PathComponentsRepresentable], relationConfiguration: ((CrudParentController) throws -> Void)?=nil ) throws where ParentType: Model & Content, @@ -114,8 +114,8 @@ public struct CrudController: CrudControllerProtocol wh } public func crudRegister( + at path: PathComponentsRepresentable..., forChildren relation: KeyPath>, - at path: [PathComponentsRepresentable], relationConfiguration: ((CrudChildrenController) throws -> Void)?=nil ) throws where ChildType: Model & Content,