Fixed typos in docs.

This commit is contained in:
Norman Jäckel 2020-04-03 13:24:15 +02:00
parent a45ac5d2e5
commit 252fe7dd51
2 changed files with 8 additions and 6 deletions

View File

@ -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. * All actions are processed independently.
* *
* TODO: Maybe we do not want to run them independently. * TODO: Maybe we do not want to run them independently.
@ -12,7 +12,7 @@ Exception ActionException(message: string);
* *
* @throws ActionException * @throws ActionException
*/ */
handle_request (payload: Action[], user_id: number): ActionResult[] handle_request (payload: Action[], user_id: Id): ActionResult[]
interface Action { interface Action {
action: string; action: string;

View File

@ -23,12 +23,12 @@ Exception PresenterException(message: string);
* *
* @throws PresenterException This exception might be thrown, if there was an * @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 * 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 { Interface Presenter {
presenter: string; presenter: string;
@ -39,6 +39,9 @@ Interface Presenter {
* A presenter may return anything. This is presenter-specific. But if there was * A presenter may return anything. This is presenter-specific. But if there was
* an error (user error, not a PresenterException), the response for this * an error (user error, not a PresenterException), the response for this
* presenter should follow `PresenterError`. * presenter should follow `PresenterError`.
*
* TODO: Maybe we do not want to response an error but always throw an exception
* instead.
*/ */
type PresenterResult = any | PresenterError; type PresenterResult = any | PresenterError;
@ -48,4 +51,3 @@ type PresenterResult = any | PresenterError;
Interface PresenterError { Interface PresenterError {
error: object; error: object;
} }