Review.
This commit is contained in:
parent
6054eb76c5
commit
3751593841
@ -5,15 +5,21 @@ Exception ActionException(message: string);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Executes multiple actions in the conext of the user given by the user_id.
|
* Executes multiple actions in the conext of the user given by the user_id.
|
||||||
* All actions are successful if no exception is thrown, else no action was
|
* All actions are processed independently.
|
||||||
* processed.
|
*
|
||||||
|
* TODO: Check if we need an interface or flag to process actions all together.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @throws ActionException
|
* @throws ActionException
|
||||||
*/
|
*/
|
||||||
handle_request (payload: Action[], user_id: number): void
|
handle_request (payload: Action[], user_id: number): ActionResult[]
|
||||||
|
|
||||||
interface Action {
|
interface Action {
|
||||||
action: string;
|
action: string;
|
||||||
data: object[];
|
data: object[]; # An array of action specific data. See JSON schema defintions.
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ActionResult {
|
||||||
|
success: boolean;
|
||||||
|
message: string;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user