You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Allowing to add createdAt and updatedAt timestamps if server side(api key
361
-
if (!$isAPIKey && !$isPrivilegedUser) {
362
-
if (isset($document['$createdAt'])) {
363
-
thrownewException($this->getInvalidStructureException(), 'Attribute "$createdAt" can not be modified. Please use a server SDK with an API key to modify server attributes.');
364
-
}
365
-
366
-
if (isset($document['$updatedAt'])) {
367
-
thrownewException($this->getInvalidStructureException(), 'Attribute "$updatedAt" can not be modified. Please use a server SDK with an API key to modify server attributes.');
// Allowing to add createdAt and updatedAt timestamps if server side(api key)
113
-
if (!$isAPIKey && !$isPrivilegedUser) {
114
-
if (isset($data['$createdAt'])) {
115
-
thrownewException($this->getInvalidStructureException(), 'Attribute "$createdAt" can not be modified. Please use a server SDK with an API key to modify server attributes.');
116
-
}
117
-
118
-
if (isset($data['$updatedAt'])) {
119
-
thrownewException($this->getInvalidStructureException(), 'Attribute "$updatedAt" can not be modified. Please use a server SDK with an API key to modify server attributes.');
120
-
}
121
-
}
122
112
// Read permission should not be required for update
@@ -157,24 +158,14 @@ public function action(string $databaseId, string $collectionId, string $documen
157
158
}
158
159
}
159
160
}
160
-
// Allowing to add createdAt and updatedAt timestamps if server side(api key)
161
-
if (!$isAPIKey && !$isPrivilegedUser) {
162
-
if (isset($data['$createdAt'])) {
163
-
thrownewException($this->getInvalidStructureException(), 'Attribute "$createdAt" can not be modified. Please use a server SDK with an API key to modify server attributes.');
164
-
}
165
-
166
-
if (isset($data['$updatedAt'])) {
167
-
thrownewException($this->getInvalidStructureException(), 'Attribute "$updatedAt" can not be modified. Please use a server SDK with an API key to modify server attributes.');
0 commit comments