Change data request
A typical request to change the data in DWKIT contains folowing parameters:
- viewName - the name of the view
- data formatted as JSON to Update, Insert or Delete
Type of change is determined by HTTP verb.
Next chaining occurs on the web server and causes the changing of the data:
- Verification that the current user has the right to add/edit/delete data from the specified view determined by viewName . If not - then the request processing is interrupted, and the error message returns.
- Calling of the before update/insert/delete function which has been bonded with view. In this function is possible to change the data which has been passed from the client or implement other business logic.
- Insert/Update/Delete data from database via DWKIT ORM.
- Creating a version of the modified object if necessary.
- Calling of the after update/insert/delete function which has been bonded with view. In this function is possible to implement some business logic.
- The information about operation (success, ids of created objects) is formatted to JSON and returned to client.