mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-16 12:33:17 +00:00
update env example
remove test endpoint
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
DATABASE_URL='mysql://root@127.0.0.1:3306/flashcards'
|
||||
DATABASE_URL=123
|
||||
DATABASE_URL_UNPOOLED=123
|
||||
ACCESS_JWT_SECRET_KEY=123
|
||||
REFRESH_JWT_SECRET_KEY=123
|
||||
AWS_ACCESS_KEY=123
|
||||
AWS_SECRET_ACCESS_KEY=123
|
||||
AWS_REGION=123
|
||||
AWS_SES_SMTP_HOST=123
|
||||
AWS_SES_SMTP_PORT=123
|
||||
AWS_SES_SMTP_USER=123
|
||||
AWS_SES_SMTP_PASS=123
|
||||
AWS_BUCKET_NAME=123
|
||||
AWS_S3_ACCESS_KEY=123
|
||||
AWS_S3_SECRET_ACCESS_KEY=123
|
||||
ADMIN_LOGIN=123
|
||||
ADMIN_PASSWORD=123
|
||||
STORAGE_SERVICE_URL=123
|
||||
STORAGE_SERVICE_TOKEN=123
|
||||
@@ -93,25 +93,6 @@ export class DecksController {
|
||||
return this.commandBus.execute(new GetAllDecksV2Command({ ...finalQuery, userId: req.user.id }))
|
||||
}
|
||||
|
||||
@HttpCode(HttpStatus.PARTIAL_CONTENT)
|
||||
@ApiOperation({ description: 'Retrieve paginated decks list.', summary: 'Paginated decks list' })
|
||||
@ApiUnauthorizedResponse({ description: 'Unauthorized' })
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Version('2')
|
||||
@Get('empty')
|
||||
async findAllEmpty(@Query() query: GetAllDecksDto, @Req() req) {
|
||||
const result: PaginatedDecks = await this.commandBus.execute(
|
||||
new GetAllDecksV2Command({
|
||||
itemsPerPage: 5000,
|
||||
minCardsCount: 0,
|
||||
maxCardsCount: 0,
|
||||
userId: req.user.id,
|
||||
})
|
||||
)
|
||||
|
||||
return this.decksRepository.deleteManyById(result.items.map(({ id }) => id))
|
||||
}
|
||||
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@ApiOperation({
|
||||
description: 'Retrieve the minimum and maximum amount of cards in a deck.',
|
||||
|
||||
Reference in New Issue
Block a user