mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Merge pull request #1045 from appwrite/refactor-event-payload-to-data
Refactor event payload to data
This commit is contained in:
commit
f97b3e34aa
27 changed files with 37 additions and 36 deletions
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
- Only logged in users can execute functions (for guests, use anonymous login)
|
- Only logged in users can execute functions (for guests, use anonymous login)
|
||||||
- Only the user who has triggered the execution get access to the relevant execution logs
|
- Only the user who has triggered the execution get access to the relevant execution logs
|
||||||
|
- Function execution env `APPWRITE_FUNCTION_EVENT_PAYLOAD` renamed to `APPWRITE_FUNCTION_EVENT_DATA`
|
||||||
|
|
||||||
# Version 0.7.2
|
# Version 0.7.2
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1148,7 +1148,7 @@ App::delete('/v1/account')
|
||||||
;
|
;
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload', $response->output($user, Response::MODEL_USER))
|
->setParam('eventData', $response->output($user, Response::MODEL_USER))
|
||||||
;
|
;
|
||||||
|
|
||||||
if (!Config::getParam('domainVerification')) {
|
if (!Config::getParam('domainVerification')) {
|
||||||
|
|
@ -1230,7 +1230,7 @@ App::delete('/v1/account/sessions/:sessionId')
|
||||||
}
|
}
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload', $response->output($session, Response::MODEL_SESSION))
|
->setParam('eventData', $response->output($session, Response::MODEL_SESSION))
|
||||||
;
|
;
|
||||||
|
|
||||||
return $response->noContent();
|
return $response->noContent();
|
||||||
|
|
@ -1300,7 +1300,7 @@ App::delete('/v1/account/sessions')
|
||||||
}
|
}
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload', $response->output(new Document([
|
->setParam('eventData', $response->output(new Document([
|
||||||
'sum' => count($sessions),
|
'sum' => count($sessions),
|
||||||
'sessions' => $sessions
|
'sessions' => $sessions
|
||||||
]), Response::MODEL_SESSION_LIST))
|
]), Response::MODEL_SESSION_LIST))
|
||||||
|
|
@ -1425,7 +1425,7 @@ App::post('/v1/account/recovery')
|
||||||
;
|
;
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload',
|
->setParam('eventData',
|
||||||
$response->output($recovery->setAttribute('secret', $secret),
|
$response->output($recovery->setAttribute('secret', $secret),
|
||||||
Response::MODEL_TOKEN
|
Response::MODEL_TOKEN
|
||||||
))
|
))
|
||||||
|
|
@ -1628,7 +1628,7 @@ App::post('/v1/account/verification')
|
||||||
;
|
;
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload',
|
->setParam('eventData',
|
||||||
$response->output($verification->setAttribute('secret', $verificationSecret),
|
$response->output($verification->setAttribute('secret', $verificationSecret),
|
||||||
Response::MODEL_TOKEN
|
Response::MODEL_TOKEN
|
||||||
))
|
))
|
||||||
|
|
|
||||||
|
|
@ -271,7 +271,7 @@ App::delete('/v1/database/collections/:collectionId')
|
||||||
;
|
;
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload', $response->output($collection, Response::MODEL_COLLECTION))
|
->setParam('eventData', $response->output($collection, Response::MODEL_COLLECTION))
|
||||||
;
|
;
|
||||||
|
|
||||||
$audits
|
$audits
|
||||||
|
|
@ -614,7 +614,7 @@ App::delete('/v1/database/collections/:collectionId/documents/:documentId')
|
||||||
}
|
}
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload', $response->output($document, Response::MODEL_ANY))
|
->setParam('eventData', $response->output($document, Response::MODEL_ANY))
|
||||||
;
|
;
|
||||||
|
|
||||||
$audits
|
$audits
|
||||||
|
|
|
||||||
|
|
@ -581,7 +581,7 @@ App::delete('/v1/storage/files/:fileId')
|
||||||
;
|
;
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload', $response->output($file, Response::MODEL_FILE))
|
->setParam('eventData', $response->output($file, Response::MODEL_FILE))
|
||||||
;
|
;
|
||||||
|
|
||||||
$response->noContent();
|
$response->noContent();
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ App::delete('/v1/teams/:teamId')
|
||||||
}
|
}
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload', $response->output($team, Response::MODEL_TEAM))
|
->setParam('eventData', $response->output($team, Response::MODEL_TEAM))
|
||||||
;
|
;
|
||||||
|
|
||||||
$response->noContent();
|
$response->noContent();
|
||||||
|
|
@ -713,7 +713,7 @@ App::delete('/v1/teams/:teamId/memberships/:inviteId')
|
||||||
;
|
;
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload', $response->output($membership, Response::MODEL_MEMBERSHIP))
|
->setParam('eventData', $response->output($membership, Response::MODEL_MEMBERSHIP))
|
||||||
;
|
;
|
||||||
|
|
||||||
$response->noContent();
|
$response->noContent();
|
||||||
|
|
|
||||||
|
|
@ -442,7 +442,7 @@ App::delete('/v1/users/:userId/sessions/:sessionId')
|
||||||
}
|
}
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload', $response->output($user, Response::MODEL_USER))
|
->setParam('eventData', $response->output($user, Response::MODEL_USER))
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -488,7 +488,7 @@ App::delete('/v1/users/:userId/sessions')
|
||||||
}
|
}
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload', $response->output($user, Response::MODEL_USER))
|
->setParam('eventData', $response->output($user, Response::MODEL_USER))
|
||||||
;
|
;
|
||||||
|
|
||||||
// TODO : Response filter implementation
|
// TODO : Response filter implementation
|
||||||
|
|
@ -548,7 +548,7 @@ App::delete('/v1/users/:userId')
|
||||||
;
|
;
|
||||||
|
|
||||||
$events
|
$events
|
||||||
->setParam('payload', $response->output($user, Response::MODEL_USER))
|
->setParam('eventData', $response->output($user, Response::MODEL_USER))
|
||||||
;
|
;
|
||||||
|
|
||||||
// TODO : Response filter implementation
|
// TODO : Response filter implementation
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ App::init(function ($utopia, $request, $response, $project, $user, $register, $e
|
||||||
->setParam('projectId', $project->getId())
|
->setParam('projectId', $project->getId())
|
||||||
->setParam('userId', $user->getId())
|
->setParam('userId', $user->getId())
|
||||||
->setParam('event', $route->getLabel('event', ''))
|
->setParam('event', $route->getLabel('event', ''))
|
||||||
->setParam('payload', [])
|
->setParam('eventData', [])
|
||||||
->setParam('functionId', null)
|
->setParam('functionId', null)
|
||||||
->setParam('executionId', null)
|
->setParam('executionId', null)
|
||||||
->setParam('trigger', 'event')
|
->setParam('trigger', 'event')
|
||||||
|
|
@ -123,8 +123,8 @@ App::shutdown(function ($utopia, $request, $response, $project, $events, $audits
|
||||||
/** @var bool $mode */
|
/** @var bool $mode */
|
||||||
|
|
||||||
if (!empty($events->getParam('event'))) {
|
if (!empty($events->getParam('event'))) {
|
||||||
if(empty($events->getParam('payload'))) {
|
if(empty($events->getParam('eventData'))) {
|
||||||
$events->setParam('payload', $response->getPayload());
|
$events->setParam('eventData', $response->getPayload());
|
||||||
}
|
}
|
||||||
|
|
||||||
$webhooks = clone $events;
|
$webhooks = clone $events;
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ class FunctionsV1
|
||||||
$trigger = $this->args['trigger'] ?? '';
|
$trigger = $this->args['trigger'] ?? '';
|
||||||
$event = $this->args['event'] ?? '';
|
$event = $this->args['event'] ?? '';
|
||||||
$scheduleOriginal = $this->args['scheduleOriginal'] ?? '';
|
$scheduleOriginal = $this->args['scheduleOriginal'] ?? '';
|
||||||
$payload = (!empty($this->args['payload'])) ? json_encode($this->args['payload']) : '';
|
$eventData = (!empty($this->args['eventData'])) ? json_encode($this->args['eventData']) : '';
|
||||||
$data = $this->args['data'] ?? '';
|
$data = $this->args['data'] ?? '';
|
||||||
$userId = $this->args['userId'] ?? '';
|
$userId = $this->args['userId'] ?? '';
|
||||||
$jwt = $this->args['jwt'] ?? '';
|
$jwt = $this->args['jwt'] ?? '';
|
||||||
|
|
@ -198,7 +198,7 @@ class FunctionsV1
|
||||||
|
|
||||||
Console::success('Triggered function: '.$event);
|
Console::success('Triggered function: '.$event);
|
||||||
|
|
||||||
$this->execute('event', $projectId, '', $database, $function, $event, $payload, $data, $userId, $jwt);
|
$this->execute('event', $projectId, '', $database, $function, $event, $eventData, $data, $userId, $jwt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -254,7 +254,7 @@ class FunctionsV1
|
||||||
'scheduleOriginal' => $function->getAttribute('schedule', ''),
|
'scheduleOriginal' => $function->getAttribute('schedule', ''),
|
||||||
]); // Async task rescheduale
|
]); // Async task rescheduale
|
||||||
|
|
||||||
$this->execute($trigger, $projectId, $executionId, $database, $function, /*$event*/'', /*$payload*/'', $data, $userId, $jwt);
|
$this->execute($trigger, $projectId, $executionId, $database, $function, /*$event*/'', /*$eventData*/'', $data, $userId, $jwt);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'http':
|
case 'http':
|
||||||
|
|
@ -266,7 +266,7 @@ class FunctionsV1
|
||||||
throw new Exception('Function not found ('.$functionId.')');
|
throw new Exception('Function not found ('.$functionId.')');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->execute($trigger, $projectId, $executionId, $database, $function, /*$event*/'', /*$payload*/'', $data, $userId, $jwt);
|
$this->execute($trigger, $projectId, $executionId, $database, $function, /*$event*/'', /*$eventData*/'', $data, $userId, $jwt);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -284,12 +284,12 @@ class FunctionsV1
|
||||||
* @param Database $database
|
* @param Database $database
|
||||||
* @param Database $function
|
* @param Database $function
|
||||||
* @param string $event
|
* @param string $event
|
||||||
* @param string $payload
|
* @param string $eventData
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function execute(string $trigger, string $projectId, string $executionId, Database $database, Document $function, string $event = '', string $payload = '', string $data = '', string $userId = '', string $jwt = ''): void
|
public function execute(string $trigger, string $projectId, string $executionId, Database $database, Document $function, string $event = '', string $eventData = '', string $data = '', string $userId = '', string $jwt = ''): void
|
||||||
{
|
{
|
||||||
global $list;
|
global $list;
|
||||||
|
|
||||||
|
|
@ -343,7 +343,7 @@ class FunctionsV1
|
||||||
'APPWRITE_FUNCTION_ENV_NAME' => $environment['name'],
|
'APPWRITE_FUNCTION_ENV_NAME' => $environment['name'],
|
||||||
'APPWRITE_FUNCTION_ENV_VERSION' => $environment['version'],
|
'APPWRITE_FUNCTION_ENV_VERSION' => $environment['version'],
|
||||||
'APPWRITE_FUNCTION_EVENT' => $event,
|
'APPWRITE_FUNCTION_EVENT' => $event,
|
||||||
'APPWRITE_FUNCTION_EVENT_PAYLOAD' => $payload,
|
'APPWRITE_FUNCTION_EVENT_DATA' => $eventData,
|
||||||
'APPWRITE_FUNCTION_DATA' => $data,
|
'APPWRITE_FUNCTION_DATA' => $data,
|
||||||
'APPWRITE_FUNCTION_USER_ID' => $userId,
|
'APPWRITE_FUNCTION_USER_ID' => $userId,
|
||||||
'APPWRITE_FUNCTION_JWT' => $jwt,
|
'APPWRITE_FUNCTION_JWT' => $jwt,
|
||||||
|
|
@ -482,7 +482,7 @@ class FunctionsV1
|
||||||
->setParam('projectId', $projectId)
|
->setParam('projectId', $projectId)
|
||||||
->setParam('userId', $userId)
|
->setParam('userId', $userId)
|
||||||
->setParam('event', 'functions.executions.update')
|
->setParam('event', 'functions.executions.update')
|
||||||
->setParam('payload', [
|
->setParam('eventData', [
|
||||||
'$id' => $execution['$id'],
|
'$id' => $execution['$id'],
|
||||||
'functionId' => $execution['functionId'],
|
'functionId' => $execution['functionId'],
|
||||||
'dateCreated' => $execution['dateCreated'],
|
'dateCreated' => $execution['dateCreated'],
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class WebhooksV1
|
||||||
$projectId = $this->args['projectId'] ?? '';
|
$projectId = $this->args['projectId'] ?? '';
|
||||||
$userId = $this->args['userId'] ?? '';
|
$userId = $this->args['userId'] ?? '';
|
||||||
$event = $this->args['event'] ?? '';
|
$event = $this->args['event'] ?? '';
|
||||||
$payload = \json_encode($this->args['payload']);
|
$eventData = \json_encode($this->args['eventData']);
|
||||||
|
|
||||||
// Webhook
|
// Webhook
|
||||||
|
|
||||||
|
|
@ -67,7 +67,7 @@ class WebhooksV1
|
||||||
$ch = \curl_init($url);
|
$ch = \curl_init($url);
|
||||||
|
|
||||||
\curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
|
\curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
|
||||||
\curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
|
\curl_setopt($ch, CURLOPT_POSTFIELDS, $eventData);
|
||||||
\curl_setopt($ch, CURLOPT_HEADER, 0);
|
\curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||||
\curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
\curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
\curl_setopt($ch, CURLOPT_USERAGENT, \sprintf(APP_USERAGENT,
|
\curl_setopt($ch, CURLOPT_USERAGENT, \sprintf(APP_USERAGENT,
|
||||||
|
|
@ -79,7 +79,7 @@ class WebhooksV1
|
||||||
CURLOPT_HTTPHEADER,
|
CURLOPT_HTTPHEADER,
|
||||||
[
|
[
|
||||||
'Content-Type: application/json',
|
'Content-Type: application/json',
|
||||||
'Content-Length: '.\strlen($payload),
|
'Content-Length: '.\strlen($eventData),
|
||||||
'X-'.APP_NAME.'-Webhook-Id: '.$id,
|
'X-'.APP_NAME.'-Webhook-Id: '.$id,
|
||||||
'X-'.APP_NAME.'-Webhook-Event: '.$event,
|
'X-'.APP_NAME.'-Webhook-Event: '.$event,
|
||||||
'X-'.APP_NAME.'-Webhook-Name: '.$name,
|
'X-'.APP_NAME.'-Webhook-Name: '.$name,
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -22,5 +22,5 @@ void main() { // Init SDK
|
||||||
print(Platform.environment["APPWRITE_FUNCTION_ENV_VERSION"]);
|
print(Platform.environment["APPWRITE_FUNCTION_ENV_VERSION"]);
|
||||||
// print(result['$id']);
|
// print(result['$id']);
|
||||||
print(Platform.environment["APPWRITE_FUNCTION_EVENT"]);
|
print(Platform.environment["APPWRITE_FUNCTION_EVENT"]);
|
||||||
print(Platform.environment["APPWRITE_FUNCTION_EVENT_PAYLOAD"]);
|
print(Platform.environment["APPWRITE_FUNCTION_EVENT_DATA"]);
|
||||||
}
|
}
|
||||||
Binary file not shown.
|
|
@ -20,4 +20,4 @@ console.log(Deno.env.get("APPWRITE_FUNCTION_ENV_NAME") || '');
|
||||||
console.log(Deno.env.get("APPWRITE_FUNCTION_ENV_VERSION") || '');
|
console.log(Deno.env.get("APPWRITE_FUNCTION_ENV_VERSION") || '');
|
||||||
// console.log(result['$id']"));
|
// console.log(result['$id']"));
|
||||||
console.log(Deno.env.get("APPWRITE_FUNCTION_EVENT") || '');
|
console.log(Deno.env.get("APPWRITE_FUNCTION_EVENT") || '');
|
||||||
console.log(Deno.env.get("APPWRITE_FUNCTION_EVENT_PAYLOAD") || '');
|
console.log(Deno.env.get("APPWRITE_FUNCTION_EVENT_DATA") || '');
|
||||||
Binary file not shown.
|
|
@ -22,7 +22,7 @@ namespace dotnet
|
||||||
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_ENV_NAME"));
|
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_ENV_NAME"));
|
||||||
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_ENV_VERSION"));
|
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_ENV_VERSION"));
|
||||||
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_EVENT"));
|
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_EVENT"));
|
||||||
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_EVENT_PAYLOAD"));
|
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_EVENT_DATA"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -22,7 +22,7 @@ namespace dotnet
|
||||||
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_ENV_NAME"));
|
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_ENV_NAME"));
|
||||||
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_ENV_VERSION"));
|
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_ENV_VERSION"));
|
||||||
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_EVENT"));
|
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_EVENT"));
|
||||||
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_EVENT_PAYLOAD"));
|
Console.WriteLine(Environment.GetEnvironmentVariable("APPWRITE_FUNCTION_EVENT_DATA"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -20,4 +20,4 @@ console.log(process.env.APPWRITE_FUNCTION_ENV_NAME);
|
||||||
console.log(process.env.APPWRITE_FUNCTION_ENV_VERSION);
|
console.log(process.env.APPWRITE_FUNCTION_ENV_VERSION);
|
||||||
// console.log(result['$id']);
|
// console.log(result['$id']);
|
||||||
console.log(process.env.APPWRITE_FUNCTION_EVENT);
|
console.log(process.env.APPWRITE_FUNCTION_EVENT);
|
||||||
console.log(process.env.APPWRITE_FUNCTION_EVENT_PAYLOAD);
|
console.log(process.env.APPWRITE_FUNCTION_EVENT_DATA);
|
||||||
Binary file not shown.
|
|
@ -25,7 +25,7 @@ echo $_ENV['APPWRITE_FUNCTION_ENV_NAME']."\n";
|
||||||
echo $_ENV['APPWRITE_FUNCTION_ENV_VERSION']."\n";
|
echo $_ENV['APPWRITE_FUNCTION_ENV_VERSION']."\n";
|
||||||
// echo $result['$id'];
|
// echo $result['$id'];
|
||||||
echo $_ENV['APPWRITE_FUNCTION_EVENT']."\n";
|
echo $_ENV['APPWRITE_FUNCTION_EVENT']."\n";
|
||||||
echo $_ENV['APPWRITE_FUNCTION_EVENT_PAYLOAD']."\n";
|
echo $_ENV['APPWRITE_FUNCTION_EVENT_DATA']."\n";
|
||||||
echo 'data:'.$_ENV['APPWRITE_FUNCTION_DATA']."\n";
|
echo 'data:'.$_ENV['APPWRITE_FUNCTION_DATA']."\n";
|
||||||
echo 'userId:'.$_ENV['APPWRITE_FUNCTION_USER_ID']."\n";
|
echo 'userId:'.$_ENV['APPWRITE_FUNCTION_USER_ID']."\n";
|
||||||
echo 'jwt:'.$_ENV['APPWRITE_FUNCTION_JWT']."\n";
|
echo 'jwt:'.$_ENV['APPWRITE_FUNCTION_JWT']."\n";
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -25,4 +25,4 @@ echo $_ENV['APPWRITE_FUNCTION_ENV_NAME']."\n";
|
||||||
echo $_ENV['APPWRITE_FUNCTION_ENV_VERSION']."\n";
|
echo $_ENV['APPWRITE_FUNCTION_ENV_VERSION']."\n";
|
||||||
// echo $result['$id'];
|
// echo $result['$id'];
|
||||||
echo $_ENV['APPWRITE_FUNCTION_EVENT']."\n";
|
echo $_ENV['APPWRITE_FUNCTION_EVENT']."\n";
|
||||||
echo $_ENV['APPWRITE_FUNCTION_EVENT_PAYLOAD']."\n";
|
echo $_ENV['APPWRITE_FUNCTION_EVENT_DATA']."\n";
|
||||||
Binary file not shown.
|
|
@ -20,4 +20,4 @@ print(os.environ["APPWRITE_FUNCTION_ENV_NAME"])
|
||||||
print(os.environ["APPWRITE_FUNCTION_ENV_VERSION"])
|
print(os.environ["APPWRITE_FUNCTION_ENV_VERSION"])
|
||||||
# print(result["$id"])
|
# print(result["$id"])
|
||||||
print(os.environ["APPWRITE_FUNCTION_EVENT"])
|
print(os.environ["APPWRITE_FUNCTION_EVENT"])
|
||||||
print(os.environ["APPWRITE_FUNCTION_EVENT_PAYLOAD"])
|
print(os.environ["APPWRITE_FUNCTION_EVENT_DATA"])
|
||||||
Binary file not shown.
|
|
@ -20,4 +20,4 @@ puts ENV["APPWRITE_FUNCTION_ENV_NAME"]
|
||||||
puts ENV["APPWRITE_FUNCTION_ENV_VERSION"]
|
puts ENV["APPWRITE_FUNCTION_ENV_VERSION"]
|
||||||
# puts result["$id"]
|
# puts result["$id"]
|
||||||
puts ENV["APPWRITE_FUNCTION_EVENT"]
|
puts ENV["APPWRITE_FUNCTION_EVENT"]
|
||||||
puts ENV["APPWRITE_FUNCTION_EVENT_PAYLOAD"]
|
puts ENV["APPWRITE_FUNCTION_EVENT_DATA"]
|
||||||
Loading…
Reference in a new issue