mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 21:21:02 +00:00
fix(api): missing OpenAPI route tags
This commit is contained in:
parent
290cc3d046
commit
d6af6f9cba
6 changed files with 10 additions and 3 deletions
|
|
@ -6,6 +6,7 @@ import {
|
|||
UseFilters,
|
||||
UseGuards,
|
||||
} from "@nestjs/common";
|
||||
import { ApiTags } from "@nestjs/swagger";
|
||||
import type { Response } from "express";
|
||||
import { User } from "../users/user.entity";
|
||||
import { AuthSession } from "./auth-session.entity";
|
||||
|
|
@ -19,6 +20,7 @@ import {
|
|||
} from "./guards/auth-strategies.guard";
|
||||
import { SpotifyAuthFilter } from "./spotify.filter";
|
||||
|
||||
@ApiTags("auth")
|
||||
@Controller("api/v1/auth")
|
||||
export class AuthController {
|
||||
constructor(private readonly authService: AuthService) {}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { Controller, Get } from "@nestjs/common";
|
||||
import { ConfigService } from "@nestjs/config";
|
||||
import { ApiTags } from "@nestjs/swagger";
|
||||
import {
|
||||
HealthCheck,
|
||||
HealthCheckResult,
|
||||
|
|
@ -9,6 +10,7 @@ import {
|
|||
} from "@nestjs/terminus";
|
||||
import { configureScope, Scope } from "@sentry/node";
|
||||
|
||||
@ApiTags("health")
|
||||
@Controller("api/v1/health")
|
||||
export class HealthCheckController {
|
||||
constructor(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { Controller, Get, Query } from "@nestjs/common";
|
||||
import { ApiTags } from "@nestjs/swagger";
|
||||
import { Pagination } from "nestjs-typeorm-paginate";
|
||||
import { AuthAccessToken } from "../auth/decorators/auth-access-token.decorator";
|
||||
import { ReqUser } from "../auth/decorators/req-user.decorator";
|
||||
|
|
@ -7,6 +8,7 @@ import { GetListensFilterDto } from "./dto/get-listens.dto";
|
|||
import { Listen } from "./listen.entity";
|
||||
import { ListensService } from "./listens.service";
|
||||
|
||||
@ApiTags("listens")
|
||||
@Controller("api/v1/listens")
|
||||
export class ListensController {
|
||||
constructor(private readonly listensService: ListensService) {}
|
||||
|
|
|
|||
|
|
@ -80,9 +80,6 @@ async function bootstrap() {
|
|||
.setDescription("Track and analyze your Spotify Listens")
|
||||
.setVersion("1.0")
|
||||
.addBearerAuth()
|
||||
.addTag("user")
|
||||
.addTag("listens")
|
||||
.addTag("auth")
|
||||
.build();
|
||||
const document = SwaggerModule.createDocument(app, options);
|
||||
SwaggerModule.setup("api/docs", app, document);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { Controller, Get, Query } from "@nestjs/common";
|
||||
import { ApiTags } from "@nestjs/swagger";
|
||||
import { AuthAccessToken } from "../auth/decorators/auth-access-token.decorator";
|
||||
import { ReqUser } from "../auth/decorators/req-user.decorator";
|
||||
import { User } from "../users/user.entity";
|
||||
|
|
@ -11,6 +12,7 @@ import { TopTracksReportDto } from "./dto/top-tracks-report.dto";
|
|||
import { ReportsService } from "./reports.service";
|
||||
import { Timeframe } from "./timeframe.enum";
|
||||
|
||||
@ApiTags("reports")
|
||||
@Controller("api/v1/reports")
|
||||
export class ReportsController {
|
||||
constructor(private readonly reportsService: ReportsService) {}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
import { Controller, Get } from "@nestjs/common";
|
||||
import { ApiTags } from "@nestjs/swagger";
|
||||
import { AuthAccessToken } from "../auth/decorators/auth-access-token.decorator";
|
||||
import { ReqUser } from "../auth/decorators/req-user.decorator";
|
||||
import { User } from "./user.entity";
|
||||
|
||||
@ApiTags("users")
|
||||
@Controller("api/v1/users")
|
||||
export class UsersController {
|
||||
@Get("me")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue