parent
345851bf1d
commit
9675e79441
|
@ -35,7 +35,7 @@ export class StatsController {
|
|||
|
||||
@Get("/authorized")
|
||||
@UseBefore(StatsAuth)
|
||||
@OpenAPI({ description: "A demo endpoint for authorized stats." })
|
||||
@OpenAPI({ description: "A demo endpoint for authorized stats.", security: [{ "StatsApiToken": [] }] })
|
||||
async getAuthorized() {
|
||||
let connection = getConnection();
|
||||
let runners = await connection.getRepository(Runner).find({ relations: ["scans"] });
|
||||
|
|
|
@ -35,6 +35,11 @@ export default async (app: Application) => {
|
|||
"in": "cookie",
|
||||
"name": "lfk_backend__refresh_token",
|
||||
description: "A cookie containing a JWT based refreh token. Attention: Doesn't work in swagger-ui. Use /api/auth/login or /api/auth/refresh to get one."
|
||||
},
|
||||
"StatsApiToken": {
|
||||
"type": "http",
|
||||
"scheme": "bearer",
|
||||
description: "Api token that can be obtained by creating a new stats client (post to /api/statsclients)."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -44,6 +44,11 @@ const spec = routingControllersToSpec(
|
|||
"in": "cookie",
|
||||
"name": "lfk_backend__refresh_token",
|
||||
description: "A cookie containing a JWT based refreh token. Attention: Doesn't work in swagger-ui. Use /api/auth/login or /api/auth/refresh to get one."
|
||||
},
|
||||
"StatsApiToken": {
|
||||
"type": "http",
|
||||
"scheme": "bearer",
|
||||
description: "Api token that can be obtained by creating a new stats client (post to /api/statsclients)."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue