From 252fe7dd510ba8f2143fca5b770fa5e3a5f25aaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Fri, 3 Apr 2020 13:24:15 +0200 Subject: [PATCH] Fixed typos in docs. --- .../{action-service.txt => actions-service.txt} | 4 ++-- docs/interfaces/presenter-service.txt | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) rename docs/interfaces/{action-service.txt => actions-service.txt} (74%) diff --git a/docs/interfaces/action-service.txt b/docs/interfaces/actions-service.txt similarity index 74% rename from docs/interfaces/action-service.txt rename to docs/interfaces/actions-service.txt index b49c67e9e..7b9ee2f88 100644 --- a/docs/interfaces/action-service.txt +++ b/docs/interfaces/actions-service.txt @@ -4,7 +4,7 @@ Exception ActionException(message: string); /** - * Executes multiple actions in the conext of the user given by the user_id. + * Executes multiple actions in the context of the user given by the user_id. * All actions are processed independently. * * TODO: Maybe we do not want to run them independently. @@ -12,7 +12,7 @@ Exception ActionException(message: string); * * @throws ActionException */ -handle_request (payload: Action[], user_id: number): ActionResult[] +handle_request (payload: Action[], user_id: Id): ActionResult[] interface Action { action: string; diff --git a/docs/interfaces/presenter-service.txt b/docs/interfaces/presenter-service.txt index 8d09572d0..d273dc2d2 100644 --- a/docs/interfaces/presenter-service.txt +++ b/docs/interfaces/presenter-service.txt @@ -23,12 +23,12 @@ Exception PresenterException(message: string); * * @throws PresenterException This exception might be thrown, if there was an * server error (Http-500-equivalent). For user error (e.g. wrong data) use the - * PresenterError interface + * PresenterError interface. */ -handle_request(user_id: Id, payload: Presenter[]): PresenterResult[] +handle_request(payload: Presenter[], user_id: Id): PresenterResult[] /** - * This interface specifies what presenter is used with the payload for the call + * This interface specifies what presenter is used with the payload for the call. */ Interface Presenter { presenter: string; @@ -39,6 +39,9 @@ Interface Presenter { * A presenter may return anything. This is presenter-specific. But if there was * an error (user error, not a PresenterException), the response for this * presenter should follow `PresenterError`. + * + * TODO: Maybe we do not want to response an error but always throw an exception + * instead. */ type PresenterResult = any | PresenterError; @@ -48,4 +51,3 @@ type PresenterResult = any | PresenterError; Interface PresenterError { error: object; } -