mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 02:01:21 +00:00
added whitelist check
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import webnotes
|
||||
|
||||
@webnotes.whitelist()
|
||||
def subscribe(arg):
|
||||
"""subscribe to blog (blog_subscriber)"""
|
||||
if webnotes.conn.sql("""select name from `tabBlog Subscriber` where name=%s""", arg):
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import json, webnotes
|
||||
|
||||
@webnotes.whitelist()
|
||||
def send(args):
|
||||
"""create support ticket"""
|
||||
args = json.loads(args)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import webnotes
|
||||
|
||||
@webnotes.whitelist()
|
||||
def unsubscribe(arg):
|
||||
"""unsubscribe from lists"""
|
||||
import webnotes
|
||||
lists = [['Blog Subscriber', 'name']]
|
||||
for l in lists:
|
||||
webnotes.conn.sql("""delete from `tab%s` where %s=%s""" % (l[0], l[1], '%s'), arg)
|
||||
|
||||
Reference in New Issue
Block a user