@@ -108,7 +108,14 @@ func (cli *Client) ContentCreateInSpace(contentType, space, parentId, title, dat
108
108
109
109
//设置父页面
110
110
if parentId != "" {
111
- content .Ancestors = []Content {Content {Id : parentId }}
111
+ content .Ancestors = []Content {
112
+ {
113
+ Id : parentId ,
114
+ Space : Space {
115
+ Key : content .Space .Key ,
116
+ },
117
+ },
118
+ }
112
119
}
113
120
114
121
resp , err := cli .ApiPOST ("/content" , content )
@@ -216,7 +223,14 @@ func (cli *Client) DrawFile(space, parentId, title, wikiDirPrefix, data string)
216
223
217
224
//设置父页面
218
225
if parentId != "" {
219
- content .Ancestors = []Content {Content {Id : parentId }}
226
+ content .Ancestors = []Content {
227
+ {
228
+ Id : parentId ,
229
+ Space : Space {
230
+ Key : content .Space .Key ,
231
+ },
232
+ },
233
+ }
220
234
}
221
235
222
236
return cli .ContentUpdate (content )
@@ -283,7 +297,14 @@ func (cli *Client) DrawFileWithNoteMacro(space, parentId, title, wikiDirPrefix,
283
297
284
298
//设置父页面
285
299
if parentId != "" {
286
- content .Ancestors = []Content {Content {Id : parentId }}
300
+ content .Ancestors = []Content {
301
+ {
302
+ Id : parentId ,
303
+ Space : Space {
304
+ Key : content .Space .Key ,
305
+ },
306
+ },
307
+ }
287
308
}
288
309
289
310
return cli .ContentUpdate (content )
@@ -379,7 +400,14 @@ func (cli *Client) DrawFileWithNewNoteMacro(options *DrawModifyPageOption) (Cont
379
400
380
401
//设置父页面
381
402
if options .ParentId != "" {
382
- content .Ancestors = []Content {{Id : options .ParentId }}
403
+ content .Ancestors = []Content {
404
+ {
405
+ Id : options .ParentId ,
406
+ Space : Space {
407
+ Key : content .Space .Key ,
408
+ },
409
+ },
410
+ }
383
411
}
384
412
385
413
return cli .ContentUpdate (content )
0 commit comments