mirror of
https://github.com/langgenius/dify.git
synced 2026-03-28 01:29:55 +08:00
[autofix.ci] apply automated fixes
This commit is contained in:
@ -318,9 +318,11 @@ class SaveNotificationContentApi(Resource):
|
||||
@console_ns.route("/admin/save_notification_user")
|
||||
class SaveNotificationUserApi(Resource):
|
||||
@console_ns.doc("save_notification_user")
|
||||
@console_ns.doc(description="Save notification users via JSON body or file upload. "
|
||||
"JSON: {\"user_email\": [\"a@example.com\", ...]}. "
|
||||
"File: multipart/form-data with a 'file' field (CSV or TXT, one email per line).")
|
||||
@console_ns.doc(
|
||||
description="Save notification users via JSON body or file upload. "
|
||||
'JSON: {"user_email": ["a@example.com", ...]}. '
|
||||
"File: multipart/form-data with a 'file' field (CSV or TXT, one email per line)."
|
||||
)
|
||||
@console_ns.response(200, "Notification users saved successfully")
|
||||
@only_edition_cloud
|
||||
@admin_required
|
||||
@ -389,4 +391,4 @@ class SaveNotificationUserApi(Resource):
|
||||
seen.add(email_lower)
|
||||
unique_emails.append(email)
|
||||
|
||||
return unique_emails
|
||||
return unique_emails
|
||||
|
||||
@ -398,7 +398,7 @@ class BillingService:
|
||||
def read_notification(cls, user_email: str):
|
||||
params = {"user_email": user_email}
|
||||
return cls._send_request("GET", "/notification/read", params=params)
|
||||
|
||||
|
||||
@classmethod
|
||||
def save_notification_user(cls, user_email: str):
|
||||
json = {"user_email": user_email}
|
||||
@ -424,4 +424,4 @@ class BillingService:
|
||||
@classmethod
|
||||
def save_notification_content(cls, content: str):
|
||||
json = {"content": content}
|
||||
return cls._send_request("POST", "/notification/new-notification", json=json)
|
||||
return cls._send_request("POST", "/notification/new-notification", json=json)
|
||||
|
||||
Reference in New Issue
Block a user