Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(environments): Update API calls for using currentProjectId #26550

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

Twixes
Copy link
Member

@Twixes Twixes commented Nov 29, 2024

Problem

Current users of environments (i.e. us) have been seeing this:

image

This was because we were calling endpoints like this: projects/${currentTeamId}/... rather than like so: projects/${currentProjectId}/...

Changes

Updated all the relevant API calls to the projects/${currentProjectId}/... form (I think I haven't missed any, though it's possible).

@Twixes Twixes requested a review from aspicer November 29, 2024 17:11
Copy link
Contributor

github-actions bot commented Nov 29, 2024

Size Change: 0 B

Total Size: 1.11 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 1.11 MB

compressed-size-action

@Twixes Twixes force-pushed the fix-project-api-paths branch from bab4fc8 to 391cc05 Compare December 2, 2024 17:07
@@ -891,7 +899,7 @@ export const hogFunctionConfigurationLogic = kea<hogFunctionConfigurationLogicTy
}
const { id, name, type } = values.hogFunction
await deleteWithUndo({
endpoint: `projects/${teamLogic.values.currentTeamId}/hog_functions`,
endpoint: `projects/${values.currentProjectId}/hog_functions`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could probably get away with values.currentProject.id here and remove the need for the currentProjectId value

@Twixes Twixes merged commit a3e9d05 into master Dec 3, 2024
96 checks passed
@Twixes Twixes deleted the fix-project-api-paths branch December 3, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants