HM-110. Научили свагер работать с авторизацией
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import {Controller, Get, Req, Post, Options, Header, Delete, HttpCode, Put, UseInterceptors} from '@nestjs/common';
|
||||
import {StoreService} from './store.service';
|
||||
import {Store, StoreRequest} from './store.schema';
|
||||
import {ApiResponse, ApiTags, ApiParam, ApiBody} from '@nestjs/swagger';
|
||||
import {ApiResponse, ApiTags, ApiParam, ApiBody, ApiBearerAuth, ApiSecurity} from '@nestjs/swagger';
|
||||
import {ALLOW_ORIGIN_ALL, ALLOW_METHOD, ALLOW_CREDENTIALS, CONTENT_LENGTH, ALLOW_HEADERS, COLLECTION_STORE} from 'src/consts';
|
||||
import {Request} from 'express';
|
||||
import {LoggingInterceptor} from 'src/logs/logging.interceptor';
|
||||
@ -31,6 +31,7 @@ const makeApiHeader = (request: Request): string => {
|
||||
return typeof apiHeader === 'string' ? apiHeader : '';
|
||||
};
|
||||
|
||||
@ApiSecurity('apiKey')
|
||||
@UseInterceptors(LoggingInterceptor)
|
||||
@Controller(COLLECTION_STORE)
|
||||
@ApiTags(COLLECTION_STORE)
|
||||
|
||||
Reference in New Issue
Block a user