Skip to content

Commit

Permalink
fix: endpoint names for monitoring (#24492)
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhpillai authored Aug 20, 2024
1 parent 0004d38 commit e9c766e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion posthog/api/dashboards/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def _deep_duplicate_tiles(self, dashboard: Dashboard, existing_tile: DashboardTi
color=existing_tile.color,
)

@monitor(feature=Feature.DASHBOARD, endpoint="update", method="PATCH")
@monitor(feature=Feature.DASHBOARD, endpoint="dashboard", method="PATCH")
def update(self, instance: Dashboard, validated_data: dict, *args: Any, **kwargs: Any) -> Dashboard:
can_user_restrict = self.user_permissions.dashboard(instance).can_restrict
if "restriction_level" in validated_data and not can_user_restrict:
Expand Down
2 changes: 1 addition & 1 deletion posthog/api/insight.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def create(self, validated_data: dict, *args: Any, **kwargs: Any) -> Insight:
return insight

@transaction.atomic()
@monitor(feature=Feature.INSIGHT, endpoint="insight", method="POST")
@monitor(feature=Feature.INSIGHT, endpoint="insight", method="PATCH")
def update(self, instance: Insight, validated_data: dict, **kwargs) -> Insight:
dashboards_before_change: list[Union[str, dict]] = []
try:
Expand Down

0 comments on commit e9c766e

Please sign in to comment.