-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Client REST API handlers #3801
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Codecov ReportBase: 82.89% // Head: 82.95% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #3801 +/- ##
==========================================
+ Coverage 82.89% 82.95% +0.06%
==========================================
Files 529 529
Lines 33840 33802 -38
==========================================
- Hits 28051 28042 -9
+ Misses 5789 5760 -29
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
b89493f
to
8389001
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
0c05325
to
bf51c5c
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
402af77
to
51e9299
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
cea999e
to
87ae615
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This functionality will be needed to support the Client REST API. GraphQL should support sending chat markers as well, but this is left for a future PR. The support for markers could be placed in this module, and shared by both API's. Also: - export user affiliation getter for use in the API modules - fix a minor mistake (double nesting of 'error')
a4c4bde
to
8cda768
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Both modules expose the generic helpers now. The admin code is not simply reused because of slight differences, e.g. with authentication and error handling.
Use mongoose_stanza_* helper modules.
Remove the logic using 'resource_exists' for consistency with the other API modules, and for avoiding duplicate calls to MUC Light modules.
Rework the permission-related code
- Catch the case when another type is passed instead of binary - Respond with a validation error (as expected) instead of crashing
- Update error messages and codes - Fix typos and dead test cases - Improve coverage by handling more error cases
8cda768
to
13f4c0c
Compare
small_tests_24 / small_tests / 13f4c0c small_tests_25 / small_tests / 13f4c0c ldap_mnesia_24 / ldap_mnesia / 13f4c0c dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 13f4c0c dynamic_domains_pgsql_mnesia_25 / pgsql_mnesia / 13f4c0c ldap_mnesia_25 / ldap_mnesia / 13f4c0c dynamic_domains_mysql_redis_25 / mysql_redis / 13f4c0c pgsql_mnesia_24 / pgsql_mnesia / 13f4c0c internal_mnesia_25 / internal_mnesia / 13f4c0c dynamic_domains_mssql_mnesia_25 / odbc_mssql_mnesia / 13f4c0c elasticsearch_and_cassandra_25 / elasticsearch_and_cassandra_mnesia / 13f4c0c pgsql_mnesia_25 / pgsql_mnesia / 13f4c0c mysql_redis_25 / mysql_redis / 13f4c0c riak_mnesia_24 / riak_mnesia / 13f4c0c mssql_mnesia_25 / odbc_mssql_mnesia / 13f4c0c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
Rework all
mongoose_client_api_*
modules to follow the design patterns ofmongoose_admin_api_*
.mongoose_client_api
has generic helpers for authentication, error handling, argument parsing etc.mongoose_client_api_*
modules use the helpers consistently, and call the API helper modules (e.g.mod_muc_light_api
) similarly to the GraphQL handlers.Other changes:
Notes: