增加清除缓存api接口

This commit is contained in:
jingrow 2026-03-15 18:32:37 +08:00
parent 92b12d5363
commit 7599a5a670

View File

@ -6,7 +6,7 @@ Session whitelist functions - Forward to SaaS using unified HTTP client
"""
import jingrow
from jingrow.utils.auth import saas_get
from jingrow.utils.auth import saas_get, saas_post
@jingrow.whitelist()
@ -25,3 +25,12 @@ def get_translations():
if resp.status_code == 200:
return resp.json().get("message", {})
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 {}