1
0
Fork 0
mirror of synced 2024-06-26 18:20:43 +12:00

Changed controllers location

This commit is contained in:
Eldad Fux 2019-12-16 06:55:05 +02:00
parent 53a97a59ca
commit 178c476109
16 changed files with 40 additions and 40 deletions

View file

@ -28,8 +28,8 @@ $scopes = [ // TODO sync with console UI list
$utopia->get('/v1/keys')
->desc('List Keys')
->label('scope', 'projects.read')
->label('sdk.namespace', 'projects')
->label('scope', 'keys.read')
->label('sdk.namespace', 'keys')
->label('sdk.method', 'listKeys')
->action(
function () use ($response, $consoleDB, $project) {
@ -39,8 +39,8 @@ $utopia->get('/v1/keys')
$utopia->get('/v1/keys/:keyId')
->desc('Get Key')
->label('scope', 'projects.read')
->label('sdk.namespace', 'projects')
->label('scope', 'keys.read')
->label('sdk.namespace', 'keys')
->label('sdk.method', 'getKey')
->param('keyId', null, function () { return new UID(); }, 'Key unique ID.')
->action(
@ -57,8 +57,8 @@ $utopia->get('/v1/keys/:keyId')
$utopia->post('/v1/keys')
->desc('Create Key')
->label('scope', 'projects.write')
->label('sdk.namespace', 'projects')
->label('scope', 'keys.write')
->label('sdk.namespace', 'keys')
->label('sdk.method', 'createKey')
->param('name', null, function () { return new Text(256); }, 'Key name')
->param('scopes', null, function () use ($scopes) { return new ArrayList(new WhiteList($scopes)); }, 'Key scopes list')
@ -96,8 +96,8 @@ $utopia->post('/v1/keys')
$utopia->put('/v1/keys/:keyId')
->desc('Update Key')
->label('scope', 'projects.write')
->label('sdk.namespace', 'projects')
->label('scope', 'keys.write')
->label('sdk.namespace', 'keys')
->label('sdk.method', 'updateKey')
->param('keyId', null, function () { return new UID(); }, 'Key unique ID.')
->param('name', null, function () { return new Text(256); }, 'Key name')
@ -125,8 +125,8 @@ $utopia->put('/v1/keys/:keyId')
$utopia->delete('/v1/keys/:keyId')
->desc('Delete Key')
->label('scope', 'projects.write')
->label('sdk.namespace', 'projects')
->label('scope', 'keys.write')
->label('sdk.namespace', 'keys')
->label('sdk.method', 'deleteKey')
->param('keyId', null, function () { return new UID(); }, 'Key unique ID.')
->action(

View file

@ -15,8 +15,8 @@ include_once '../shared/api.php';
$utopia->get('/v1/platforms')
->desc('List Platforms')
->label('scope', 'projects.read')
->label('sdk.namespace', 'projects')
->label('scope', 'platforms.read')
->label('sdk.namespace', 'platforms')
->label('sdk.method', 'listPlatforms')
->action(
function () use ($request, $response, $consoleDB, $project) {
@ -26,8 +26,8 @@ $utopia->get('/v1/platforms')
$utopia->get('/v1/platforms/:platformId')
->desc('Get Platform')
->label('scope', 'projects.read')
->label('sdk.namespace', 'projects')
->label('scope', 'platforms.read')
->label('sdk.namespace', 'platforms')
->label('sdk.method', 'getPlatform')
->param('platformId', null, function () { return new UID(); }, 'Platform unique ID.')
->action(
@ -44,8 +44,8 @@ $utopia->get('/v1/platforms/:platformId')
$utopia->post('/v1/platforms')
->desc('Create Platform')
->label('scope', 'projects.write')
->label('sdk.namespace', 'projects')
->label('scope', 'platforms.write')
->label('sdk.namespace', 'platforms')
->label('sdk.method', 'createPlatform')
->param('type', null, function () { return new WhiteList(['web', 'ios', 'android', 'unity']); }, 'Platform name')
->param('name', null, function () { return new Text(256); }, 'Platform name')
@ -90,8 +90,8 @@ $utopia->post('/v1/platforms')
$utopia->put('/v1/platforms/:platformId')
->desc('Update Platform')
->label('scope', 'projects.write')
->label('sdk.namespace', 'projects')
->label('scope', 'platforms.write')
->label('sdk.namespace', 'platforms')
->label('sdk.method', 'updatePlatform')
->param('platformId', null, function () { return new UID(); }, 'Platform unique ID.')
->param('name', null, function () { return new Text(256); }, 'Platform name')
@ -124,8 +124,8 @@ $utopia->put('/v1/platforms/:platformId')
$utopia->delete('/v1/platforms/:platformId')
->desc('Delete Platform')
->label('scope', 'projects.write')
->label('sdk.namespace', 'projects')
->label('scope', 'platforms.write')
->label('sdk.namespace', 'platforms')
->label('sdk.method', 'deletePlatform')
->param('platformId', null, function () { return new UID(); }, 'Platform unique ID.')
->action(

View file

@ -20,8 +20,8 @@ include_once '../shared/api.php';
$utopia->get('/v1/tasks')
->desc('List Tasks')
->label('scope', 'projects.read')
->label('sdk.namespace', 'projects')
->label('scope', 'tasks.read')
->label('sdk.namespace', 'tasks')
->label('sdk.method', 'listTasks')
->action(
function () use ($request, $response, $consoleDB, $project) {
@ -45,8 +45,8 @@ $utopia->get('/v1/tasks')
$utopia->get('/v1/tasks/:taskId')
->desc('Get Task')
->label('scope', 'projects.read')
->label('sdk.namespace', 'projects')
->label('scope', 'tasks.read')
->label('sdk.namespace', 'tasks')
->label('sdk.method', 'getTask')
->param('taskId', null, function () { return new UID(); }, 'Task unique ID.')
->action(
@ -70,8 +70,8 @@ $utopia->get('/v1/tasks/:taskId')
$utopia->post('/v1/tasks')
->desc('Create Task')
->label('scope', 'projects.write')
->label('sdk.namespace', 'projects')
->label('scope', 'tasks.write')
->label('sdk.namespace', 'tasks')
->label('sdk.method', 'createTask')
->param('name', null, function () { return new Text(256); }, 'Task name')
->param('status', null, function () { return new WhiteList(['play', 'pause']); }, 'Task status')
@ -145,8 +145,8 @@ $utopia->post('/v1/tasks')
$utopia->put('/v1/tasks/:taskId')
->desc('Update Task')
->label('scope', 'projects.write')
->label('sdk.namespace', 'projects')
->label('scope', 'tasks.write')
->label('sdk.namespace', 'tasks')
->label('sdk.method', 'updateTask')
->param('taskId', null, function () { return new UID(); }, 'Task unique ID.')
->param('name', null, function () { return new Text(256); }, 'Task name')
@ -208,8 +208,8 @@ $utopia->put('/v1/tasks/:taskId')
$utopia->delete('/v1/tasks/:taskId')
->desc('Delete Task')
->label('scope', 'projects.write')
->label('sdk.namespace', 'projects')
->label('scope', 'tasks.write')
->label('sdk.namespace', 'tasks')
->label('sdk.method', 'deleteTask')
->param('taskId', null, function () { return new UID(); }, 'Task unique ID.')
->action(

View file

@ -17,8 +17,8 @@ include_once '../shared/api.php';
$utopia->get('/v1/webhooks')
->desc('List Webhooks')
->label('scope', 'projects.read')
->label('sdk.namespace', 'projects')
->label('scope', 'webhooks.read')
->label('sdk.namespace', 'webhooks')
->label('sdk.method', 'listWebhooks')
->action(
function () use ($request, $response, $consoleDB, $project) {
@ -42,8 +42,8 @@ $utopia->get('/v1/webhooks')
$utopia->get('/v1/webhooks/:webhookId')
->desc('Get Webhook')
->label('scope', 'projects.read')
->label('sdk.namespace', 'projects')
->label('scope', 'webhooks.read')
->label('sdk.namespace', 'webhooks')
->label('sdk.method', 'getWebhook')
->param('webhookId', null, function () { return new UID(); }, 'Webhook unique ID.')
->action(
@ -67,8 +67,8 @@ $utopia->get('/v1/webhooks/:webhookId')
$utopia->post('/v1/webhooks')
->desc('Create Webhook')
->label('scope', 'projects.write')
->label('sdk.namespace', 'projects')
->label('scope', 'webhooks.write')
->label('sdk.namespace', 'webhooks')
->label('sdk.method', 'createWebhook')
->param('name', null, function () { return new Text(256); }, 'Webhook name')
->param('events', null, function () { return new ArrayList(new Text(256)); }, 'Webhook events list')
@ -124,8 +124,8 @@ $utopia->post('/v1/webhooks')
$utopia->put('/v1/webhooks/:webhookId')
->desc('Update Webhook')
->label('scope', 'projects.write')
->label('sdk.namespace', 'projects')
->label('scope', 'webhooks.write')
->label('sdk.namespace', 'webhooks')
->label('sdk.method', 'updateWebhook')
->param('webhookId', null, function () { return new UID(); }, 'Webhook unique ID.')
->param('name', null, function () { return new Text(256); }, 'Webhook name')
@ -172,8 +172,8 @@ $utopia->put('/v1/webhooks/:webhookId')
$utopia->delete('/v1/webhooks/:webhookId')
->desc('Delete Webhook')
->label('scope', 'projects.write')
->label('sdk.namespace', 'projects')
->label('scope', 'webhooks.write')
->label('sdk.namespace', 'webhooks')
->label('sdk.method', 'deleteWebhook')
->param('webhookId', null, function () { return new UID(); }, 'Webhook unique ID.')
->action(