mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Merge remote-tracking branch 'origin/1.8.x' into feat-txn
This commit is contained in:
commit
070d5f59d1
3 changed files with 17 additions and 11 deletions
|
|
@ -108,10 +108,7 @@ class XList extends Action
|
|||
$audit = new Audit($dbForProject);
|
||||
$type = $this->getCollectionsEventsContext();
|
||||
$context = $this->getContext();
|
||||
$resource = match ($context) {
|
||||
ROWS => "database/$databaseId/grid/$type/$collectionId/$context/{$document->getId()}",
|
||||
default => "database/$databaseId/$type/$collectionId/$context/{$document->getId()}",
|
||||
};
|
||||
$resource = "database/$databaseId/$type/$collectionId/$context/{$document->getId()}";
|
||||
|
||||
$logs = $audit->getLogsByResource($resource, $queries);
|
||||
|
||||
|
|
|
|||
|
|
@ -104,11 +104,7 @@ class XList extends Action
|
|||
|
||||
$audit = new Audit($dbForProject);
|
||||
$context = $this->getContext();
|
||||
$resource = match ($context) {
|
||||
TABLES => "database/$databaseId/grid/$context/$collectionId",
|
||||
default => "database/$databaseId/$context/$collectionId",
|
||||
};
|
||||
|
||||
$resource = "database/$databaseId/$context/$collectionId";
|
||||
$logs = $audit->getLogsByResource($resource, $queries);
|
||||
|
||||
$output = [];
|
||||
|
|
|
|||
|
|
@ -2,8 +2,21 @@ module.exports = async(context) => {
|
|||
// Create a string that is 1000001 characters long (exceeds the 1000000 limit)
|
||||
const longString = 'z' + 'a'.repeat(1000000);
|
||||
|
||||
context.log(longString);
|
||||
context.error(longString);
|
||||
// Split the string into chunks of 8000 characters (max limit for each log and error)
|
||||
const chunkSize = 8000;
|
||||
const chunks = [];
|
||||
|
||||
for (let i = 0; i < longString.length; i += chunkSize) {
|
||||
chunks.push(longString.slice(i, i + chunkSize));
|
||||
}
|
||||
|
||||
chunks.forEach((chunk, index) => {
|
||||
context.log(chunk);
|
||||
});
|
||||
|
||||
chunks.forEach((chunk, index) => {
|
||||
context.error(chunk);
|
||||
});
|
||||
|
||||
return context.res.json({
|
||||
motto: 'Build like a team of hundreds_',
|
||||
|
|
|
|||
Loading…
Reference in a new issue