Week 6
Goals for the week
| Sl. No. | Initial Goals | Completed |
|---|---|---|
| 1. | Solve requested changes on existing PRs | Done |
| 2. | Resume the implementation of API to add a user | Pending (Docs) |
| 3. | API for changing the upload permissions | Not Started |
Requested changes and modifications
For the Edit User Api
-
Changing the request format to be more simplified ---
- From this

- To this

- From this
-
Modify the backend function to allow the user to send the only field which he/she wants to modify(edit). For instance, If the user wants to update the
descriptionhe will just give theuserIdin params in path, and description field in the request body. All other fields which are not given in the request body will be automatically set in the backend from the DB. Refer to the discussion here.
New API for adding a user (Started)
- Gaurav sir sent me the patch that converted the
user_addplugin to extend fromDefaultPluginrather thanFO_Plugin. - This enabled me to use this plugin's existing methods to add a user which prevented code duplication and repetition of logic.
- This Implementation included the following tasks ---
- Create a new
POST /usersroute in theindex.phpfile insidewww/ui/apidirectory. - Add a new method
AddUserin theUserController.phpfile. - Try to re-use the methods that are already used in the
user-addplugin.
- Create a new
Testing POST /users
- Use any API platform like postman.
- Pull the changes from this PR.
- Provide the request body as following ----

- You can expect a response like this

Conclusions and further plans
- Complete the implementation of
POST /usersAPI to add a new user and document everything inopenapi.yamlfile. - Start figuring out the requirements for the implementation of
upload-permisionsAPI for modifying the upload permissions of each group for a upload and design the API in swagger docs..