Merge remote-tracking branch 'origin/1.8.x' into feat-txn

This commit is contained in:
Jake Barnby 2025-10-02 19:25:46 +13:00
commit 070d5f59d1
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
3 changed files with 17 additions and 11 deletions

View file

@ -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);

View file

@ -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 = [];

View file

@ -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_',