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 apps/api/plane/app/views/page/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def partial_update(self, request, slug, project_id, pk):
def retrieve(self, request, slug, project_id, pk=None):
page = self.get_queryset().filter(pk=pk).first()
project = Project.objects.get(pk=project_id)
track_visit = request.query_params.get("track_visit", "false").lower() == "true"
track_visit = request.query_params.get("track_visit", "true").lower() == "true"

"""
if the role is guest and guest_view_all_features is false and owned by is not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ const PageDetailsPage = observer(() => {
const { error: pageDetailsError } = useSWR(
workspaceSlug && projectId && pageId ? `PAGE_DETAILS_${pageId}` : null,
workspaceSlug && projectId && pageId
? () =>
fetchPageDetails(workspaceSlug?.toString(), projectId?.toString(), pageId.toString(), {
trackVisit: true,
})
? () => fetchPageDetails(workspaceSlug?.toString(), projectId?.toString(), pageId.toString())
: null,
{
revalidateIfStale: true,
Expand Down
13 changes: 5 additions & 8 deletions apps/web/core/store/pages/project-page.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export interface IProjectPageStore {
workspaceSlug: string,
projectId: string,
pageId: string,
{ trackVisit }: { trackVisit: boolean }
options?: { trackVisit?: boolean }
) => Promise<TPage | undefined>;
createPage: (pageData: Partial<TPage>) => Promise<TPage | undefined>;
removePage: (pageId: string) => Promise<void>;
Expand Down Expand Up @@ -244,12 +244,9 @@ export class ProjectPageStore implements IProjectPageStore {
* @description fetch the details of a page
* @param {string} pageId
*/
fetchPageDetails = async (
workspaceSlug: string,
projectId: string,
pageId: string,
{ trackVisit }: { trackVisit: boolean }
) => {
fetchPageDetails = async (...args: Parameters<IProjectPageStore["fetchPageDetails"]>) => {
const [workspaceSlug, projectId, pageId, options] = args;
const { trackVisit } = options || {};
try {
if (!workspaceSlug || !projectId || !pageId) return undefined;

Expand All @@ -259,7 +256,7 @@ export class ProjectPageStore implements IProjectPageStore {
this.error = undefined;
});

const page = await this.service.fetchById(workspaceSlug, projectId, pageId, trackVisit);
const page = await this.service.fetchById(workspaceSlug, projectId, pageId, trackVisit ?? true);

runInAction(() => {
if (page?.id) {
Expand Down
Loading