File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { makeChanges } from "./makeChanges.ts";
44import { pull } from "./pull.ts" ;
55import { pinNumber } from "./pin.ts" ;
66import type { Line } from "../../deps/scrapbox.ts" ;
7- import { ensureEditablePage , pushCommit , pushWithRetry } from "./_fetch.ts" ;
7+ import { pushCommit , pushWithRetry } from "./_fetch.ts" ;
88
99/** 指定したページを削除する
1010 *
@@ -16,23 +16,22 @@ export async function deletePage(
1616 title : string ,
1717) : Promise < void > {
1818 const [
19- { id : pageId , commitId : initialCommitId , persistent } ,
19+ { pageId, commitId : parentId , persistent } ,
2020 projectId ,
2121 userId ,
2222 ] = await Promise . all ( [
23- ensureEditablePage ( project , title ) ,
23+ pull ( project , title ) ,
2424 getProjectId ( project ) ,
2525 getUserId ( ) ,
2626 ] ) ;
27- let parentId = initialCommitId ;
2827
29- if ( ! persistent ) return ;
28+ if ( persistent ) return ;
3029
3130 const io = await socketIO ( ) ;
3231 const { request } = wrap ( io ) ;
3332
3433 try {
35- parentId = await pushWithRetry ( request , [ { deleted : true } ] , {
34+ await pushWithRetry ( request , [ { deleted : true } ] , {
3635 projectId,
3736 pageId,
3837 parentId,
You can’t perform that action at this time.
0 commit comments