Ejemplo n.º 1
0
    def get(self, request, region_name, *args, **kwargs):
        """
        获取指定数据中心的Key
        ---

        """
        key = region_services.get_public_key(self.team, region_name)
        result = general_message(200, 'query success', '数据中心key获取成功', bean=key)
        return Response(result, status=200)
Ejemplo n.º 2
0
    def get(self, request, region_name, *args, **kwargs):
        """
        获取指定数据中心的Key
        ---

        """
        try:
            key = region_services.get_public_key(self.team, region_name)
            result = general_message(200, 'query success', '数据中心key获取成功', bean=key)
            return Response(result, status=200)
        except Exception as e:
            logger.exception(e)
            result = error_message(e.message)
            return Response(result, status=500)