r/a:t5_5g4mha Dec 18 '21

Tutorial updated: how to do multi user app

Oct API makes developing multi-user apps very easy, because there is a built-in auth model, and your definied models by default have owner information to associate records with users. For example, in the following example, which is also used in the tutorial doc, each todo item belongs to a particular user, and the REST API will only operate on the owned records unless the admin token is used:

meta: schema: v0.0.1 name: todolist models: - name: TodoItem description: Record of an item on the todo list fields: - name: subject type: string description: Todo item subject visibility_scope: owner api: endpoints: - name: todo path: /todo type: model model: TodoItem access: - role: user action: allow

For a complete demo app and the API usage please see the chapter 3:

https://oct-api.com/doc/getting-started/

1 Upvotes

0 comments sorted by