mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Added decode/encode support in DB overwrite method
This commit is contained in:
@@ -315,13 +315,19 @@ class Database
|
||||
throw new AuthorizationException($validator->getDescription()); // var_dump($validator->getDescription()); return false;
|
||||
}
|
||||
|
||||
$new = $this->encode($new);
|
||||
|
||||
$validator = new Structure($this);
|
||||
|
||||
if (!$validator->isValid($new)) { // Make sure updated structure still apply collection rules (if any)
|
||||
throw new StructureException($validator->getDescription()); // var_dump($validator->getDescription()); return false;
|
||||
}
|
||||
|
||||
return new Document($this->adapter->updateDocument($data));
|
||||
$new = new Document($this->adapter->updateDocument($new->getArrayCopy()));
|
||||
|
||||
$new = $this->decode($new);
|
||||
|
||||
return $new;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user