mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Change console-key endpoint from GET to POST
This commit is contained in:
@@ -694,14 +694,14 @@ Http::get('/v1/migrations/:migrationId')
|
||||
$response->dynamic($migration, Response::MODEL_MIGRATION);
|
||||
});
|
||||
|
||||
Http::get('/v1/migrations/appwrite/console-key')
|
||||
Http::post('/v1/migrations/appwrite/console-key')
|
||||
->groups(['api', 'migrations'])
|
||||
->desc('Generate console API key for migration')
|
||||
->desc('Create console API key for migration')
|
||||
->label('scope', 'migrations.write')
|
||||
->label('sdk', new Method(
|
||||
namespace: 'migrations',
|
||||
group: null,
|
||||
name: 'getAppwriteConsoleKey',
|
||||
name: 'createAppwriteConsoleKey',
|
||||
description: '/docs/references/migrations/migration-appwrite-console-key.md',
|
||||
auth: [AuthType::KEY],
|
||||
responses: [
|
||||
|
||||
@@ -1175,7 +1175,7 @@ trait MigrationsBase
|
||||
*/
|
||||
public function testGetAppwriteConsoleKey(): void
|
||||
{
|
||||
$response = $this->client->call(Client::METHOD_GET, '/migrations/appwrite/console-key', [
|
||||
$response = $this->client->call(Client::METHOD_POST, '/migrations/appwrite/console-key', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getProject()['$id'],
|
||||
'x-appwrite-key' => $this->getProject()['apiKey'],
|
||||
@@ -1229,7 +1229,7 @@ trait MigrationsBase
|
||||
$this->assertEquals(0, $result['statusCounters'][Resource::TYPE_PLATFORM]['warning']);
|
||||
|
||||
// Get a console key for the destination project to access console-scoped endpoints
|
||||
$consoleKeyResponse = $this->client->call(Client::METHOD_GET, '/migrations/appwrite/console-key', [
|
||||
$consoleKeyResponse = $this->client->call(Client::METHOD_POST, '/migrations/appwrite/console-key', [
|
||||
'content-type' => 'application/json',
|
||||
'x-appwrite-project' => $this->getDestinationProject()['$id'],
|
||||
'x-appwrite-key' => $this->getDestinationProject()['apiKey'],
|
||||
|
||||
Reference in New Issue
Block a user