Преглед изворни кода

implement resumeRenameOperation in page-operation client service

yohei0125 пре 3 година
родитељ
комит
2e1bdef7cc
1 измењених фајлова са 12 додато и 1 уклоњено
  1. 12 1
      packages/app/src/client/services/page-operation.ts

+ 12 - 1
packages/app/src/client/services/page-operation.ts

@@ -3,7 +3,8 @@ import urljoin from 'url-join';
 import { SubscriptionStatusType } from '~/interfaces/subscription';
 
 import { toastError } from '../util/apiNotification';
-import { apiv3Put } from '../util/apiv3-client';
+import { apiv3Post, apiv3Put } from '../util/apiv3-client';
+
 
 export const toggleSubscribe = async(pageId: string, currentStatus: SubscriptionStatusType | undefined): Promise<void> => {
   try {
@@ -60,3 +61,13 @@ export const exportAsMarkdown = (pageId: string, revisionId: string, format: str
   url.searchParams.append('revisionId', revisionId);
   window.location.href = url.href;
 };
+
+
+export const resumeRenameOperation = async(pageId: string): Promise<void> => {
+  try {
+    await apiv3Post('/pages/resume-rename', { pageId });
+  }
+  catch (err) {
+    throw err;
+  }
+};