Merge branch 'refactor/space-app' of github.com:makeplane/plane into refactor/space-app

This commit is contained in:
NarayanBavisetti 2024-06-04 19:22:53 +05:30
commit edba70e9b1
2 changed files with 4 additions and 7 deletions

View File

@ -30,9 +30,9 @@ const ProjectIssuesPage = (props: Props) => {
useEffect(() => {
if (!workspaceSlug || !projectId) return;
publishService
.fetchAnchorFromOldDetails(workspaceSlug, projectId)
.fetchAnchorFromProjectDetails(workspaceSlug, projectId)
.then((res) => {
let url = `/${res.anchor}`;
let url = `/issues/${res.anchor}`;
const params = new URLSearchParams();
if (board) params.append("board", board);
if (peekId) params.append("peekId", peekId);

View File

@ -17,16 +17,13 @@ class PublishService extends APIService {
});
}
async fetchAnchorFromOldDetails(
async fetchAnchorFromProjectDetails(
workspaceSlug: string,
projectID: string
): Promise<{
anchor: string;
}> {
return this.post(`/api/public/publish-anchor/`, {
workspaceSlug,
projectID,
})
return this.get(`/api/public/workspaces/${workspaceSlug}/projects/${projectID}/anchor/`)
.then((response) => response?.data)
.catch((error) => {
throw error?.response;