mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +00:00
Merge branch 'feat-session-alert-improvements' of https://github.com/appwrite/appwrite into feat-session-alert-improvements
This commit is contained in:
commit
9022606242
17 changed files with 153 additions and 93 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -9,6 +9,7 @@
|
||||||
!/.idea/php.xml
|
!/.idea/php.xml
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.php_cs.cache
|
.php_cs.cache
|
||||||
|
.phpactor.json
|
||||||
debug/
|
debug/
|
||||||
app/sdks
|
app/sdks
|
||||||
dev/yasd_init.php
|
dev/yasd_init.php
|
||||||
|
|
|
||||||
4
.gitmodules
vendored
4
.gitmodules
vendored
|
|
@ -1,4 +0,0 @@
|
||||||
[submodule "app/console"]
|
|
||||||
path = app/console
|
|
||||||
url = https://github.com/appwrite/console
|
|
||||||
branch = 1.6.x
|
|
||||||
18
Dockerfile
18
Dockerfile
|
|
@ -12,23 +12,6 @@ RUN composer install --ignore-platform-reqs --optimize-autoloader \
|
||||||
--no-plugins --no-scripts --prefer-dist \
|
--no-plugins --no-scripts --prefer-dist \
|
||||||
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`
|
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`
|
||||||
|
|
||||||
FROM --platform=$BUILDPLATFORM node:20.11.0-alpine3.19 as node
|
|
||||||
|
|
||||||
COPY app/console /usr/local/src/console
|
|
||||||
|
|
||||||
WORKDIR /usr/local/src/console
|
|
||||||
|
|
||||||
ARG VITE_GA_PROJECT
|
|
||||||
ARG VITE_CONSOLE_MODE
|
|
||||||
ARG VITE_APPWRITE_GROWTH_ENDPOINT=https://growth.appwrite.io/v1
|
|
||||||
|
|
||||||
ENV VITE_GA_PROJECT=$VITE_GA_PROJECT
|
|
||||||
ENV VITE_CONSOLE_MODE=$VITE_CONSOLE_MODE
|
|
||||||
ENV VITE_APPWRITE_GROWTH_ENDPOINT=$VITE_APPWRITE_GROWTH_ENDPOINT
|
|
||||||
|
|
||||||
RUN npm ci
|
|
||||||
RUN npm run build
|
|
||||||
|
|
||||||
FROM appwrite/base:0.9.1 as final
|
FROM appwrite/base:0.9.1 as final
|
||||||
|
|
||||||
LABEL maintainer="team@appwrite.io"
|
LABEL maintainer="team@appwrite.io"
|
||||||
|
|
@ -48,7 +31,6 @@ RUN \
|
||||||
WORKDIR /usr/src/code
|
WORKDIR /usr/src/code
|
||||||
|
|
||||||
COPY --from=composer /usr/local/src/vendor /usr/src/code/vendor
|
COPY --from=composer /usr/local/src/vendor /usr/src/code/vendor
|
||||||
COPY --from=node /usr/local/src/console/build /usr/src/code/console
|
|
||||||
|
|
||||||
# Add Source Code
|
# Add Source Code
|
||||||
COPY ./app /usr/src/code/app
|
COPY ./app /usr/src/code/app
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ return [
|
||||||
[
|
[
|
||||||
'key' => 'cli',
|
'key' => 'cli',
|
||||||
'name' => 'Command Line',
|
'name' => 'Command Line',
|
||||||
'version' => '6.0.0-rc.3',
|
'version' => '6.0.0-rc.4',
|
||||||
'url' => 'https://github.com/appwrite/sdk-for-cli',
|
'url' => 'https://github.com/appwrite/sdk-for-cli',
|
||||||
'package' => 'https://www.npmjs.com/package/appwrite-cli',
|
'package' => 'https://www.npmjs.com/package/appwrite-cli',
|
||||||
'enabled' => true,
|
'enabled' => true,
|
||||||
|
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit f978cecfafe55e85fcd20fe90fc020e78a7c7952
|
|
||||||
|
|
@ -16,8 +16,7 @@ App::init()
|
||||||
;
|
;
|
||||||
});
|
});
|
||||||
|
|
||||||
App::get('/console/*')
|
App::get('/')
|
||||||
->alias('/')
|
|
||||||
->alias('auth/*')
|
->alias('auth/*')
|
||||||
->alias('/invite')
|
->alias('/invite')
|
||||||
->alias('/login')
|
->alias('/login')
|
||||||
|
|
@ -31,45 +30,13 @@ App::get('/console/*')
|
||||||
->inject('request')
|
->inject('request')
|
||||||
->inject('response')
|
->inject('response')
|
||||||
->action(function (Request $request, Response $response) {
|
->action(function (Request $request, Response $response) {
|
||||||
$fallback = file_get_contents(__DIR__ . '/../../../console/index.html');
|
$url = parse_url($request->getURI());
|
||||||
|
$target = "/console{$url['path']}";
|
||||||
// Card SSR
|
if ($url['query'] ?? false) {
|
||||||
if (\str_starts_with($request->getURI(), '/card')) {
|
$target .= "?{$url['query']}";
|
||||||
$urlCunks = \explode('/', $request->getURI());
|
|
||||||
$userId = $urlCunks[\count($urlCunks) - 1] ?? '';
|
|
||||||
|
|
||||||
$domain = $request->getProtocol() . '://' . $request->getHostname();
|
|
||||||
|
|
||||||
if (!empty($userId)) {
|
|
||||||
$ogImageUrl = $domain . '/v1/cards/cloud-og?userId=' . $userId;
|
|
||||||
} else {
|
|
||||||
$ogImageUrl = $domain . '/v1/cards/cloud-og?mock=normal';
|
|
||||||
}
|
|
||||||
|
|
||||||
$ogTags = [
|
|
||||||
'<title>Appwrite Cloud Card</title>',
|
|
||||||
'<meta name="description" content="Appwrite Cloud is now LIVE! Share your Cloud card for a chance to win an exclusive Cloud hoodie!">',
|
|
||||||
'<meta property="og:url" content="' . $domain . $request->getURI() . '">',
|
|
||||||
'<meta name="og:image:type" content="image/png">',
|
|
||||||
'<meta name="og:image:width" content="1008">',
|
|
||||||
'<meta name="og:image:height" content="1008">',
|
|
||||||
'<meta property="og:type" content="website">',
|
|
||||||
'<meta property="og:title" content="Appwrite Cloud Card">',
|
|
||||||
'<meta property="og:description" content="Appwrite Cloud is now LIVE! Share your Cloud card for a chance to win an exclusive Cloud hoodie!">',
|
|
||||||
'<meta property="og:image" content="' . $ogImageUrl . '">',
|
|
||||||
'<meta name="twitter:card" content="summary_large_image">',
|
|
||||||
'<meta property="twitter:domain" content="' . $request->getHostname() . '">',
|
|
||||||
'<meta property="twitter:url" content="' . $domain . $request->getURI() . '">',
|
|
||||||
'<meta name="twitter:title" content="Appwrite Cloud Card">',
|
|
||||||
'<meta name="twitter:image:type" content="image/png">',
|
|
||||||
'<meta name="twitter:image:width" content="1008">',
|
|
||||||
'<meta name="twitter:image:height" content="1008">',
|
|
||||||
'<meta name="twitter:description" content="Appwrite Cloud is now LIVE! Share your Cloud card for a chance to win an exclusive Cloud hoodie!">',
|
|
||||||
'<meta name="twitter:image" content="' . $ogImageUrl . '">',
|
|
||||||
];
|
|
||||||
|
|
||||||
$fallback = \str_replace('<!-- {{CLOUD_OG}} -->', \implode('', $ogTags), $fallback);
|
|
||||||
}
|
}
|
||||||
|
if ($url['fragment'] ?? false) {
|
||||||
$response->html($fallback);
|
$target .= "#{$url['fragment']}";
|
||||||
|
}
|
||||||
|
$response->redirect($target);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,6 @@ $http->on(Constant::EVENT_AFTER_RELOAD, function ($server, $workerId) {
|
||||||
Console::success('Reload completed...');
|
Console::success('Reload completed...');
|
||||||
});
|
});
|
||||||
|
|
||||||
Files::load(__DIR__ . '/../console');
|
|
||||||
|
|
||||||
include __DIR__ . '/controllers/general.php';
|
include __DIR__ . '/controllers/general.php';
|
||||||
|
|
||||||
$http->on(Constant::EVENT_START, function (Server $http) use ($payloadSize, $register) {
|
$http->on(Constant::EVENT_START, function (Server $http) use ($payloadSize, $register) {
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ const APP_USER_ACCESS = 24 * 60 * 60; // 24 hours
|
||||||
const APP_PROJECT_ACCESS = 24 * 60 * 60; // 24 hours
|
const APP_PROJECT_ACCESS = 24 * 60 * 60; // 24 hours
|
||||||
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
|
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
|
||||||
const APP_CACHE_BUSTER = 4314;
|
const APP_CACHE_BUSTER = 4314;
|
||||||
const APP_VERSION_STABLE = '1.5.7';
|
const APP_VERSION_STABLE = '1.6.0';
|
||||||
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
|
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
|
||||||
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
|
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
|
||||||
const APP_DATABASE_ATTRIBUTE_IP = 'ip';
|
const APP_DATABASE_ATTRIBUTE_IP = 'ip';
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,28 @@ $image = $this->getParam('image', '');
|
||||||
- _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET
|
- _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET
|
||||||
- _APP_ASSISTANT_OPENAI_API_KEY
|
- _APP_ASSISTANT_OPENAI_API_KEY
|
||||||
|
|
||||||
|
appwrite-console:
|
||||||
|
<<: *x-logging
|
||||||
|
container_name: appwrite-console
|
||||||
|
image: <?php echo $organization; ?>/console:appwrite/console:5.0.0-rc.11
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- appwrite
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.constraint-label-stack=appwrite"
|
||||||
|
- "traefik.docker.network=appwrite"
|
||||||
|
- "traefik.http.services.appwrite_console.loadbalancer.server.port=80"
|
||||||
|
#ws
|
||||||
|
- traefik.http.routers.appwrite_console_http.entrypoints=appwrite_web
|
||||||
|
- traefik.http.routers.appwrite_console_http.rule=PathPrefix(`/console`)
|
||||||
|
- traefik.http.routers.appwrite_console_http.service=appwrite_console
|
||||||
|
# wss
|
||||||
|
- traefik.http.routers.appwrite_console_https.entrypoints=appwrite_websecure
|
||||||
|
- traefik.http.routers.appwrite_console_https.rule=PathPrefix(`/console`)
|
||||||
|
- traefik.http.routers.appwrite_console_https.service=appwrite_console
|
||||||
|
- traefik.http.routers.appwrite_console_https.tls=true
|
||||||
|
|
||||||
appwrite-realtime:
|
appwrite-realtime:
|
||||||
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
|
image: <?php echo $organization; ?>/<?php echo $image; ?>:<?php echo $version."\n"; ?>
|
||||||
entrypoint: realtime
|
entrypoint: realtime
|
||||||
|
|
|
||||||
33
composer.lock
generated
33
composer.lock
generated
|
|
@ -356,16 +356,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "chillerlan/php-settings-container",
|
"name": "chillerlan/php-settings-container",
|
||||||
"version": "2.1.5",
|
"version": "2.1.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/chillerlan/php-settings-container.git",
|
"url": "https://github.com/chillerlan/php-settings-container.git",
|
||||||
"reference": "f705310389264c3578fdd9ffb15aa2cd6d91772e"
|
"reference": "5553558bd381fce5108c6d0343c12e488cfec6bb"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/f705310389264c3578fdd9ffb15aa2cd6d91772e",
|
"url": "https://api.github.com/repos/chillerlan/php-settings-container/zipball/5553558bd381fce5108c6d0343c12e488cfec6bb",
|
||||||
"reference": "f705310389264c3578fdd9ffb15aa2cd6d91772e",
|
"reference": "5553558bd381fce5108c6d0343c12e488cfec6bb",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|
@ -373,15 +373,16 @@
|
||||||
"php": "^7.4 || ^8.0"
|
"php": "^7.4 || ^8.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phan/phan": "^5.4",
|
"phpmd/phpmd": "^2.15",
|
||||||
"phpcsstandards/php_codesniffer": "^3.8",
|
"phpstan/phpstan": "^1.11",
|
||||||
"phpmd/phpmd": "^2.13",
|
"phpstan/phpstan-deprecation-rules": "^1.2",
|
||||||
"phpunit/phpunit": "^9.6"
|
"phpunit/phpunit": "^9.6",
|
||||||
|
"squizlabs/php_codesniffer": "^3.10"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"chillerlan\\Settings\\": "src/"
|
"chillerlan\\Settings\\": "src"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
|
@ -418,7 +419,7 @@
|
||||||
"type": "ko_fi"
|
"type": "ko_fi"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2024-01-05T23:20:55+00:00"
|
"time": "2024-07-17T01:04:28+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "dragonmantank/cron-expression",
|
"name": "dragonmantank/cron-expression",
|
||||||
|
|
@ -2989,16 +2990,16 @@
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
{
|
{
|
||||||
"name": "appwrite/sdk-generator",
|
"name": "appwrite/sdk-generator",
|
||||||
"version": "0.39.2",
|
"version": "0.39.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||||
"reference": "550b56aa7ee3f98319b79a20d2478e68a1b5e9bd"
|
"reference": "16142d88270e368030d7956cadf2d7816413f8c4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/550b56aa7ee3f98319b79a20d2478e68a1b5e9bd",
|
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/16142d88270e368030d7956cadf2d7816413f8c4",
|
||||||
"reference": "550b56aa7ee3f98319b79a20d2478e68a1b5e9bd",
|
"reference": "16142d88270e368030d7956cadf2d7816413f8c4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
|
@ -3034,9 +3035,9 @@
|
||||||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
||||||
"source": "https://github.com/appwrite/sdk-generator/tree/0.39.2"
|
"source": "https://github.com/appwrite/sdk-generator/tree/0.39.3"
|
||||||
},
|
},
|
||||||
"time": "2024-07-10T11:23:54+00:00"
|
"time": "2024-07-12T15:29:48+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/deprecations",
|
"name": "doctrine/deprecations",
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ services:
|
||||||
DEBUG: false
|
DEBUG: false
|
||||||
TESTING: true
|
TESTING: true
|
||||||
VERSION: dev
|
VERSION: dev
|
||||||
ports:
|
ports:
|
||||||
- 9501:80
|
- 9501:80
|
||||||
networks:
|
networks:
|
||||||
- appwrite
|
- appwrite
|
||||||
|
|
@ -192,6 +192,28 @@ services:
|
||||||
- _APP_EXPERIMENT_LOGGING_CONFIG
|
- _APP_EXPERIMENT_LOGGING_CONFIG
|
||||||
- _APP_DATABASE_SHARED_TABLES
|
- _APP_DATABASE_SHARED_TABLES
|
||||||
|
|
||||||
|
appwrite-console:
|
||||||
|
<<: *x-logging
|
||||||
|
container_name: appwrite-console
|
||||||
|
image: appwrite/console:5.0.0-rc.11
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- appwrite
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.constraint-label-stack=appwrite"
|
||||||
|
- "traefik.docker.network=appwrite"
|
||||||
|
- "traefik.http.services.appwrite_console.loadbalancer.server.port=80"
|
||||||
|
#ws
|
||||||
|
- traefik.http.routers.appwrite_console_http.entrypoints=appwrite_web
|
||||||
|
- traefik.http.routers.appwrite_console_http.rule=PathPrefix(`/console`)
|
||||||
|
- traefik.http.routers.appwrite_console_http.service=appwrite_console
|
||||||
|
# wss
|
||||||
|
- traefik.http.routers.appwrite_console_https.entrypoints=appwrite_websecure
|
||||||
|
- traefik.http.routers.appwrite_console_https.rule=PathPrefix(`/console`)
|
||||||
|
- traefik.http.routers.appwrite_console_https.service=appwrite_console
|
||||||
|
- traefik.http.routers.appwrite_console_https.tls=true
|
||||||
|
|
||||||
appwrite-realtime:
|
appwrite-realtime:
|
||||||
entrypoint: realtime
|
entrypoint: realtime
|
||||||
<<: *x-logging
|
<<: *x-logging
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,2 @@
|
||||||
appwrite account deleteMfaAuthenticator \
|
appwrite account deleteMfaAuthenticator \
|
||||||
--type totp \
|
--type totp
|
||||||
--otp <OTP>
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
convertNoticesToExceptions="true"
|
convertNoticesToExceptions="true"
|
||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
processIsolation="false"
|
processIsolation="false"
|
||||||
stopOnFailure="false"
|
stopOnFailure="true"
|
||||||
>
|
>
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension class="Appwrite\Tests\TestHook" />
|
<extension class="Appwrite\Tests\TestHook" />
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@ abstract class Migration
|
||||||
'1.5.5' => 'V20',
|
'1.5.5' => 'V20',
|
||||||
'1.5.6' => 'V20',
|
'1.5.6' => 'V20',
|
||||||
'1.5.7' => 'V20',
|
'1.5.7' => 'V20',
|
||||||
|
'1.6.0' => 'V21',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
72
src/Appwrite/Migration/Version/V21.php
Normal file
72
src/Appwrite/Migration/Version/V21.php
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Appwrite\Migration\Version;
|
||||||
|
|
||||||
|
use Appwrite\Migration\Migration;
|
||||||
|
use Exception;
|
||||||
|
use Throwable;
|
||||||
|
use Utopia\CLI\Console;
|
||||||
|
use Utopia\Database\Database;
|
||||||
|
|
||||||
|
class V21 extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @throws Throwable
|
||||||
|
*/
|
||||||
|
public function execute(): void
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Disable SubQueries for Performance.
|
||||||
|
*/
|
||||||
|
foreach (['subQueryIndexes', 'subQueryPlatforms', 'subQueryDomains', 'subQueryKeys', 'subQueryWebhooks', 'subQuerySessions', 'subQueryTokens', 'subQueryMemberships', 'subQueryVariables', 'subQueryChallenges', 'subQueryProjectVariables', 'subQueryTargets', 'subQueryTopicTargets'] as $name) {
|
||||||
|
Database::addFilter(
|
||||||
|
$name,
|
||||||
|
fn () => null,
|
||||||
|
fn () => []
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Console::log('Migrating Project: ' . $this->project->getAttribute('name') . ' (' . $this->project->getId() . ')');
|
||||||
|
$this->projectDB->setNamespace("_{$this->project->getInternalId()}");
|
||||||
|
|
||||||
|
Console::info('Migrating Collections');
|
||||||
|
$this->migrateCollections();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migrate Collections.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
* @throws Exception|Throwable
|
||||||
|
*/
|
||||||
|
private function migrateCollections(): void
|
||||||
|
{
|
||||||
|
$internalProjectId = $this->project->getInternalId();
|
||||||
|
$collectionType = match ($internalProjectId) {
|
||||||
|
'console' => 'console',
|
||||||
|
default => 'projects',
|
||||||
|
};
|
||||||
|
|
||||||
|
$collections = $this->collections[$collectionType];
|
||||||
|
foreach ($collections as $collection) {
|
||||||
|
$id = $collection['$id'];
|
||||||
|
|
||||||
|
Console::log("Migrating Collection \"{$id}\"");
|
||||||
|
|
||||||
|
$this->projectDB->setNamespace("_$internalProjectId");
|
||||||
|
|
||||||
|
switch ($id) {
|
||||||
|
case 'projects':
|
||||||
|
|
||||||
|
// Create accessedAt attribute
|
||||||
|
try {
|
||||||
|
$this->createAttributeFromCollection($this->projectDB, $id, 'accessedAt');
|
||||||
|
} catch (Throwable $th) {
|
||||||
|
Console::warning("'accessedAt' from {$id}: {$th->getMessage()}");
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -15,7 +15,7 @@ class HTTPTest extends Scope
|
||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->client->setEndpoint('http://localhost');
|
$this->client->setEndpoint('http://traefik');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testOptions()
|
public function testOptions()
|
||||||
|
|
@ -163,11 +163,11 @@ class HTTPTest extends Scope
|
||||||
|
|
||||||
public function testDefaultOAuth2()
|
public function testDefaultOAuth2()
|
||||||
{
|
{
|
||||||
$response = $this->client->call(Client::METHOD_GET, '/auth/oauth2/success', $this->getHeaders());
|
$response = $this->client->call(Client::METHOD_GET, '/console/auth/oauth2/success', $this->getHeaders());
|
||||||
|
|
||||||
$this->assertEquals(200, $response['headers']['status-code']);
|
$this->assertEquals(200, $response['headers']['status-code']);
|
||||||
|
|
||||||
$response = $this->client->call(Client::METHOD_GET, '/auth/oauth2/failure', $this->getHeaders());
|
$response = $this->client->call(Client::METHOD_GET, '/console/auth/oauth2/failure', $this->getHeaders());
|
||||||
|
|
||||||
$this->assertEquals(200, $response['headers']['status-code']);
|
$this->assertEquals(200, $response['headers']['status-code']);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ class HooksTest extends Scope
|
||||||
public function setUp(): void
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->client->setEndpoint('http://localhost');
|
$this->client->setEndpoint('http://traefik');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testProjectHooks()
|
public function testProjectHooks()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue