dpgaspar commented on code in PR #27849: URL: https://github.com/apache/superset/pull/27849#discussion_r1562493039
########## superset/views/users/api.py: ########## @@ -93,3 +97,85 @@ def get_my_roles(self) -> Response: return self.response_401() user = bootstrap_user_data(g.user, include_perms=True) return self.response(200, result=user) + + +class UserRestApi(BaseSupersetApi): + """An API to get information about users""" + + resource_name = "user" + openapi_spec_tag = "User" + openapi_spec_component_schemas = (UserResponseSchema,) + + @expose("/<user_id>/avatar.png", methods=("GET",)) + @safe + def avatar(self, user_id: str) -> Response: Review Comment: we could just: `@expose("/<user_id:int>/avatar.png", methods=("GET",))` and then remove the `isdigit` check -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org