mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
chore: update endpoint
This commit is contained in:
parent
2d564a949e
commit
4718cb04a7
@ -30,9 +30,9 @@ const ProjectIssuesPage = (props: Props) => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!workspaceSlug || !projectId) return;
|
if (!workspaceSlug || !projectId) return;
|
||||||
publishService
|
publishService
|
||||||
.fetchAnchorFromOldDetails(workspaceSlug, projectId)
|
.fetchAnchorFromProjectDetails(workspaceSlug, projectId)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
let url = `/${res.anchor}`;
|
let url = `/issues/${res.anchor}`;
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
if (board) params.append("board", board);
|
if (board) params.append("board", board);
|
||||||
if (peekId) params.append("peekId", peekId);
|
if (peekId) params.append("peekId", peekId);
|
||||||
|
@ -17,16 +17,13 @@ class PublishService extends APIService {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async fetchAnchorFromOldDetails(
|
async fetchAnchorFromProjectDetails(
|
||||||
workspaceSlug: string,
|
workspaceSlug: string,
|
||||||
projectID: string
|
projectID: string
|
||||||
): Promise<{
|
): Promise<{
|
||||||
anchor: string;
|
anchor: string;
|
||||||
}> {
|
}> {
|
||||||
return this.post(`/api/public/publish-anchor/`, {
|
return this.get(`/api/public/workspaces/${workspaceSlug}/projects/${projectID}/anchor/`)
|
||||||
workspaceSlug,
|
|
||||||
projectID,
|
|
||||||
})
|
|
||||||
.then((response) => response?.data)
|
.then((response) => response?.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
throw error?.response;
|
throw error?.response;
|
||||||
|
Loading…
Reference in New Issue
Block a user