增加清除缓存api接口
This commit is contained in:
parent
92b12d5363
commit
7599a5a670
@ -6,7 +6,7 @@ Session whitelist functions - Forward to SaaS using unified HTTP client
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import jingrow
|
import jingrow
|
||||||
from jingrow.utils.auth import saas_get
|
from jingrow.utils.auth import saas_get, saas_post
|
||||||
|
|
||||||
|
|
||||||
@jingrow.whitelist()
|
@jingrow.whitelist()
|
||||||
@ -25,3 +25,12 @@ def get_translations():
|
|||||||
if resp.status_code == 200:
|
if resp.status_code == 200:
|
||||||
return resp.json().get("message", {})
|
return resp.json().get("message", {})
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
|
@jingrow.whitelist()
|
||||||
|
def clear():
|
||||||
|
"""Clear user cache - Forward to SaaS"""
|
||||||
|
resp = saas_post('/api/action/jingrow.sessions.clear')
|
||||||
|
if resp.status_code == 200:
|
||||||
|
return resp.json().get("message", {})
|
||||||
|
return {}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user