MihoyoBBSTools/index.py
2022-01-10 21:07:30 +08:00

22 lines
534 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import main
import push
import main_multi
from error import CookieError
def main_handler(event: dict, context: dict):
try:
status_code = main.main()
except CookieError:
status_code = 0
push.push(status_code, "脚本已执行")
print("云函数测试支持!")
return 0
def main_handler_mulit(event: dict, context: dict):
# 多用户需要传递True表示自动执行不需要手动进行确认
main_multi.main_multi(True)
print("云函数多用户测试支持!")
return 0