add swagger link from docs

This commit is contained in:
lendry
2026-06-25 13:51:53 +03:00
parent d8f97ee232
commit c3e06e03cf
2 changed files with 3 additions and 3 deletions

View File

@@ -18,14 +18,14 @@ async function bootstrap() {
const config = new DocumentBuilder() const config = new DocumentBuilder()
.setTitle('Lendry ID API') .setTitle('Lendry ID API')
.setDescription('REST API для единого входа, безопасности, RBAC и администрирования Lendry ID.') .setDescription('REST API для единого входа, безопасности, RBAC и администрирования.')
.setVersion('0.1.0') .setVersion('0.1.0')
.addBearerAuth() .addBearerAuth()
.build(); .build();
const document = SwaggerModule.createDocument(app, config); const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup('docs', app, document, { SwaggerModule.setup('docs', app, document, {
swaggerOptions: { persistAuthorization: true }, swaggerOptions: { persistAuthorization: true },
customSiteTitle: 'Документация Lendry ID API' customSiteTitle: 'Документация API'
}); });
await app.listen(process.env.PORT ? Number(process.env.PORT) : 3000); await app.listen(process.env.PORT ? Number(process.env.PORT) : 3000);

View File

@@ -27,7 +27,7 @@ export function DocsHeader() {
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<Button variant="ghost" size="sm" asChild className="hidden md:inline-flex"> <Button variant="ghost" size="sm" asChild className="hidden md:inline-flex">
<a href={`${apiUrl}/api`} target="_blank" rel="noreferrer"> <a href={`${apiUrl}/docs`} target="_blank" rel="noreferrer">
Swagger Swagger
<ExternalLink className="h-3.5 w-3.5" /> <ExternalLink className="h-3.5 w-3.5" />
</a> </a>