feat(control-panel): add oidc account switching

This commit is contained in:
thanhnv
2026-07-18 14:05:35 +07:00
parent 03ddeb7123
commit ffff800295
5 changed files with 94 additions and 11 deletions
@@ -8,9 +8,10 @@ import { ChatModule } from './chat/chat.module.js';
import { ProviderAuthModule } from './provider-auth/provider-auth.module.js';
import { GoalsModule } from './goals/goals.module.js';
import { EvidenceModule } from './evidence/evidence.module.js';
import { SessionController } from './session/session.controller.js';
@Module({
imports: [TelemetryModule, SettingsModule, KillSwitchModule, ApprovalsModule, ChatModule, ProviderAuthModule, GoalsModule, EvidenceModule],
controllers: [HealthController],
controllers: [HealthController, SessionController],
})
export class AppModule {}
@@ -0,0 +1,11 @@
import { Controller, Get, Headers } from '@nestjs/common';
import { ok } from '../common/api-response.js';
import { actorFromHeaders } from '../common/auth-context.js';
@Controller('api/v1/session')
export class SessionController {
@Get()
current(@Headers() headers: Record<string, string | string[] | undefined>) {
return ok(actorFromHeaders(headers));
}
}