1
0
Fork 0
mirror of synced 2024-06-29 19:50:26 +12:00

Merge pull request #2795 from appwrite/fix-func-model

Fix func model execute attribute type
This commit is contained in:
Eldad A. Fux 2022-02-17 00:02:26 +02:00 committed by GitHub
commit b6566d9cca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 20 additions and 16 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -67,7 +67,7 @@
"slickdeals/statsd": "3.1.0"
},
"require-dev": {
"appwrite/sdk-generator": "0.17.1",
"appwrite/sdk-generator": "0.17.2",
"phpunit/phpunit": "9.5.10",
"swoole/ide-helper": "4.8.3",
"textalk/websocket": "1.5.5",

14
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ab493f0a7f01a1105f8bc5caaf9b928b",
"content-hash": "70ce232aec13929c9cc7901fa34282a0",
"packages": [
{
"name": "adhocore/jwt",
@ -3083,16 +3083,16 @@
},
{
"name": "appwrite/sdk-generator",
"version": "0.17.1",
"version": "0.17.2",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "3542c6ed0f808b6a9f6735a8aad7ccda961bea29"
"reference": "37bc6fc1b4b4940c7659748d7d2d5110da5457a4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/3542c6ed0f808b6a9f6735a8aad7ccda961bea29",
"reference": "3542c6ed0f808b6a9f6735a8aad7ccda961bea29",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/37bc6fc1b4b4940c7659748d7d2d5110da5457a4",
"reference": "37bc6fc1b4b4940c7659748d7d2d5110da5457a4",
"shasum": ""
},
"require": {
@ -3126,9 +3126,9 @@
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"support": {
"issues": "https://github.com/appwrite/sdk-generator/issues",
"source": "https://github.com/appwrite/sdk-generator/tree/0.17.1"
"source": "https://github.com/appwrite/sdk-generator/tree/0.17.2"
},
"time": "2022-01-07T12:55:37+00:00"
"time": "2022-01-28T08:25:10+00:00"
},
{
"name": "composer/pcre",

View file

@ -19,9 +19,9 @@ class Func extends Model
->addRule('execute', [
'type' => self::TYPE_STRING,
'description' => 'Execution permissions.',
'default' => '',
'default' => [],
'example' => 'role:member',
'array' => false,
'array' => true,
])
->addRule('name', [
'type' => self::TYPE_STRING,

View file

@ -25,6 +25,7 @@ class FunctionsCustomServerTest extends Scope
'x-appwrite-project' => $this->getProject()['$id'],
], $this->getHeaders()), [
'functionId' => 'unique()',
'execute' => ['role:all'],
'name' => 'Test',
'runtime' => 'php-8.0',
'vars' => [
@ -58,6 +59,9 @@ class FunctionsCustomServerTest extends Scope
'account.create',
'account.delete',
], $response1['body']['events']);
$this->assertEquals([
'role:all'
], $response1['body']['execute']);
$this->assertEquals('0 0 1 1 *', $response1['body']['schedule']);
$this->assertEquals(10, $response1['body']['timeout']);