编写权限路由
This commit is contained in:
parent
535c71eb29
commit
296f80ec4a
|
@ -0,0 +1,7 @@
|
||||||
|
class ErrorException(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
# 这个错误类型可以直接将错误传递到前端,作为错误提示
|
||||||
|
class CommonException(Exception):
|
||||||
|
pass
|
|
@ -0,0 +1,12 @@
|
||||||
|
from typing import List
|
||||||
|
|
||||||
|
|
||||||
|
def make_auth_rule_data(rule_id_list: List[int]) -> str:
|
||||||
|
auth_rule_data = "".join([str(item) for item in rule_id_list])
|
||||||
|
return auth_rule_data
|
||||||
|
|
||||||
|
|
||||||
|
def parse_auth_rule_data(auth_rule_data: str) -> List[int]:
|
||||||
|
rule_id_list = [int(item) for item in auth_rule_data.split(",")]
|
||||||
|
return rule_id_list
|
||||||
|
|
Loading…
Reference in New Issue