File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
packages/cozy-stack-client/src Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -1658,6 +1658,7 @@ Implements `DocumentCollection` API to interact with the /settings endpoint of t
1658
1658
* [ SettingsCollection] ( #SettingsCollection )
1659
1659
* [ .get(id)] ( #SettingsCollection+get ) ⇒ <code >object</code >
1660
1660
* [ .update(document)] ( #SettingsCollection+update )
1661
+ * [ .updateLastSynced()] ( #SettingsCollection+updateLastSynced )
1661
1662
1662
1663
<a name =" SettingsCollection+get " ></a >
1663
1664
@@ -1682,6 +1683,12 @@ Updates a settings document
1682
1683
| --- | --- | --- |
1683
1684
| document | <code >object</code > | Document to update. Do not forget the _ id attribute |
1684
1685
1686
+ <a name =" SettingsCollection+updateLastSynced " ></a >
1687
+
1688
+ ### settingsCollection.updateLastSynced()
1689
+ Updates the current OAuth client's last synchronization date
1690
+
1691
+ ** Kind** : instance method of [ <code >SettingsCollection</code >] ( #SettingsCollection )
1685
1692
<a name =" SharingCollection " ></a >
1686
1693
1687
1694
## SharingCollection
Original file line number Diff line number Diff line change @@ -83,6 +83,13 @@ class SettingsCollection extends DocumentCollection {
83
83
data : normalizeDoc ( resp . data , this . doctype )
84
84
}
85
85
}
86
+
87
+ /**
88
+ * Updates the current OAuth client's last synchronization date
89
+ */
90
+ async updateLastSynced ( ) {
91
+ return this . stackClient . fetchJSON ( 'POST' , '/settings/synchronized' )
92
+ }
86
93
}
87
94
88
95
SettingsCollection . normalizeDoctype = DocumentCollection . normalizeDoctypeJsonApi
You can’t perform that action at this time.
0 commit comments