This commit is contained in:
2026-05-06 19:36:53 +03:00
parent 43dd36e20e
commit 8b3a3964a5
10 changed files with 48 additions and 45 deletions
+7 -4
View File
@@ -10,16 +10,16 @@ use Intervention\Image\ImageManager;
use Lucent\Account\AuthService;
use Lucent\Account\AuthServiceLunar;
use Lucent\Account\UserRepo;
use Lucent\Account\UserRepoLucent;
use Lucent\Account\UserRepoLunar;
use Lucent\Channel\ChannelService;
use Lucent\Commands\CompileSchemas;
use Lucent\Commands\GenerateCollectionSchema;
use Lucent\Commands\GenerateFileSchema;
use Lucent\Commands\LiveLink;
use Lucent\Commands\RebuildThumbnails;
use Lucent\Commands\RemoveOrphanEdges;
use Lucent\Commands\SetupDatabase;
use Lucent\Commands\UpgradeFiles122;
use Lucent\Data\ChannelAuth;
use Lucent\File\FileService;
use Lucent\Query\DatabaseGraph\DatabaseGraph;
use Lucent\Query\DatabaseGraph\PgsqlDatabaseGraph;
@@ -43,8 +43,11 @@ class LucentServiceProvider extends ServiceProvider
return new PgsqlDatabaseGraph();
});
$this->app->bind(UserRepo::class, function () {
return new UserRepoLunar();
$this->app->bind(UserRepo::class, function ($app) {
return match ($app->make(ChannelService::class)->channel->auth) {
ChannelAuth::LUNAR => new UserRepoLunar(),
ChannelAuth::LUCENT => new UserRepoLucent(),
};
});
$this->app->bind(AuthService::class, function ($app) {