Skip to content

Commit

Permalink
Merge pull request #10 from stat-kwon/master
Browse files Browse the repository at this point in the history
fix: delete change_value_by_rule
  • Loading branch information
stat-kwon authored Dec 26, 2023
2 parents b70cd2f + f796fe2 commit f094b6f
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions src/spaceone/board/service/post_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(self, *args, **kwargs):
permission="board:Post.write",
role_types=["SYSTEM_ADMIN", "DOMAIN_ADMIN"],
)
@check_required(["board_id", "title", "contents"])
@check_required(["board_type", "title", "contents"])
def create(self, params: dict) -> Post:
"""Create post
Expand Down Expand Up @@ -191,8 +191,6 @@ def delete(self, params: dict) -> None:
],
)
@change_value_by_rule("APPEND", "domain_id", "*")
@change_value_by_rule("APPEND", "workspace_id", "*")
@change_value_by_rule("APPEND", "user_projects", "*")
@check_required(["post_id"])
def get(self, params: dict) -> Tuple[Post, list]:
"""Get post
Expand Down Expand Up @@ -232,17 +230,13 @@ def get(self, params: dict) -> Tuple[Post, list]:
],
)
@change_value_by_rule("APPEND", "domain_id", "*")
@change_value_by_rule("APPEND", "workspace_id", "*")
@change_value_by_rule("APPEND", "user_projects", "*")
@append_query_filter(
[
"board_type",
"post_id",
"category",
"writer",
"domain_id",
"workspace_id",
"user_projects",
"domain_id"
]
)
def list(self, params: dict) -> dict:
Expand Down Expand Up @@ -281,10 +275,8 @@ def list(self, params: dict) -> dict:
],
)
@change_value_by_rule("APPEND", "domain_id", "*")
@change_value_by_rule("APPEND", "workspace_id", "*")
@change_value_by_rule("APPEND", "user_projects", "*")
@check_required(["query"])
@append_query_filter(["domain_id", "workspace_id", "user_projects"])
@append_query_filter(["domain_id"])
def stat(self, params: dict) -> dict:
"""List posts
Expand Down

0 comments on commit f094b6f

Please sign in to comment.