mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge remote-tracking branch 'origin/main' into 1.7.x
# Conflicts: # app/config/specs/open-api3-1.7.x-console.json # app/config/specs/open-api3-1.7.x-server.json # app/config/specs/open-api3-latest-console.json # app/config/specs/open-api3-latest-server.json # app/config/specs/swagger2-1.7.x-console.json # app/config/specs/swagger2-1.7.x-server.json # app/config/specs/swagger2-latest-console.json # app/config/specs/swagger2-latest-server.json # app/init/constants.php # composer.lock # docs/references/databases/upsert-documents.md # tests/e2e/Services/Account/AccountCustomClientTest.php
This commit is contained in:
@@ -3233,7 +3233,7 @@ App::post('/v1/account/recovery')
|
||||
throw new Exception(Exception::USER_BLOCKED);
|
||||
}
|
||||
|
||||
$expire = DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_RECOVERY);
|
||||
$expire = DateTime::formatTz(DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_RECOVERY));
|
||||
|
||||
$secret = Auth::tokenGenerator(Auth::TOKEN_LENGTH_RECOVERY);
|
||||
$recovery = new Document([
|
||||
@@ -3490,7 +3490,7 @@ App::post('/v1/account/verification')
|
||||
}
|
||||
|
||||
$verificationSecret = Auth::tokenGenerator(Auth::TOKEN_LENGTH_VERIFICATION);
|
||||
$expire = DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_CONFIRM);
|
||||
$expire = DateTime::formatTz(DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_CONFIRM));
|
||||
|
||||
$verification = new Document([
|
||||
'$id' => ID::unique(),
|
||||
@@ -3738,7 +3738,7 @@ App::post('/v1/account/verification/phone')
|
||||
}
|
||||
|
||||
$secret ??= Auth::codeGenerator();
|
||||
$expire = DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_CONFIRM);
|
||||
$expire = DateTime::formatTz(DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_CONFIRM));
|
||||
|
||||
$verification = new Document([
|
||||
'$id' => ID::unique(),
|
||||
@@ -4346,7 +4346,7 @@ App::post('/v1/account/mfa/challenge')
|
||||
->inject('plan')
|
||||
->action(function (string $factor, Response $response, Database $dbForProject, Document $user, Locale $locale, Document $project, Request $request, Event $queueForEvents, Messaging $queueForMessaging, Mail $queueForMails, callable $timelimit, StatsUsage $queueForStatsUsage, array $plan) {
|
||||
|
||||
$expire = DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_CONFIRM);
|
||||
$expire = DateTime::formatTz(DateTime::addSeconds(new \DateTime(), Auth::TOKEN_EXPIRATION_CONFIRM));
|
||||
$code = Auth::codeGenerator();
|
||||
$challenge = new Document([
|
||||
'userId' => $user->getId(),
|
||||
|
||||
@@ -4728,7 +4728,7 @@ App::patch('/v1/databases/:databaseId/collections/:collectionId/documents')
|
||||
});
|
||||
|
||||
App::put('/v1/databases/:databaseId/collections/:collectionId/documents')
|
||||
->desc('Create or update documents')
|
||||
->desc('Upsert documents')
|
||||
->groups(['api', 'database'])
|
||||
->label('scope', 'documents.write')
|
||||
->label('resourceType', RESOURCE_TYPE_DATABASES)
|
||||
|
||||
Reference in New Issue
Block a user