deleteDocument
The deleteDocument is responsible for deleting a document from the underlying content source.
Netlify Create calls this method when the user deletes a document using the Netlify Create UI.
Parameters
This method receives an options
object with the following properties:
document:
Document
: object representing the document being deleted, as stored in the Netlify Create cache.userContext?: UserContext
: An object that contains the user'semail
,name
, and optional OAuth access tokens defined by theUserContext
generic type.
Return Value
This method should return a Promise
that resolves with a void
, indicating that the document has been successfully deleted.
Example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28