mirror of
https://github.com/veops/cmdb.git
synced 2025-08-07 00:02:46 +08:00
feat: notice_config access messenger (#190)
This commit is contained in:
@@ -156,3 +156,15 @@ class GetEmployeeNoticeByIds(APIView):
|
||||
else:
|
||||
result = EmployeeCRUD.get_employee_notice_by_ids(employee_ids)
|
||||
return self.jsonify(result)
|
||||
|
||||
|
||||
class EmployeeBindNoticeWithACLID(APIView):
|
||||
url_prefix = (f'{prefix}/by_uid/bind_notice/<string:platform>/<int:_uid>',)
|
||||
|
||||
def put(self, platform, _uid):
|
||||
data = EmployeeCRUD.bind_notice_by_uid(platform, _uid)
|
||||
return self.jsonify(info=data)
|
||||
|
||||
def delete(self, platform, _uid):
|
||||
data = EmployeeCRUD.remove_bind_notice_by_uid(platform, _uid)
|
||||
return self.jsonify(info=data)
|
||||
|
@@ -69,3 +69,11 @@ class NoticeConfigGetView(APIView):
|
||||
def get(self):
|
||||
res = NoticeConfigCRUD.get_all()
|
||||
return self.jsonify(res)
|
||||
|
||||
|
||||
class NoticeAppBotView(APIView):
|
||||
url_prefix = (f'{prefix}/app_bot',)
|
||||
|
||||
def get(self):
|
||||
res = NoticeConfigCRUD.get_app_bot()
|
||||
return self.jsonify(res)
|
||||
|
Reference in New Issue
Block a user