Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web-app/packages/lib/src/modules/project/projectApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export const ProjectApi = {
data: UpdatePublicFlagParams,
withRetry?: boolean
): Promise<AxiosResponse<ProjectAccess>> {
return ProjectModule.httpService.patch(`/app/project/${id}/access`, data, {
return ProjectModule.httpService.patch(`/app/project/${id}/public`, data, {
...(withRetry ? getDefaultRetryOptions() : {})
})
},
Expand Down
7 changes: 2 additions & 5 deletions web-app/packages/lib/src/modules/project/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -884,11 +884,8 @@ export const useProjectStore = defineStore('projectModule', {
const notificationStore = useNotificationStore()
this.accessLoading = true
try {
const response = await ProjectApi.updatePublicFlag(
payload.projectId,
payload.data
)
this.project.access = response.data
await ProjectApi.updatePublicFlag(payload.projectId, payload.data)
this.project.access.public = !this.project.access?.public
} catch {
notificationStore.error({
text: `Failed to update public flag`
Expand Down
Loading