1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-05 05:40:06 +00:00

feat: added get authorizedRoutes api endpoint

This commit is contained in:
2022-07-04 19:14:06 +05:00
parent e54a09db19
commit b10e932605
8 changed files with 109 additions and 42 deletions

View File

@@ -1,4 +1,8 @@
import { Route, Tags, Example, Get } from 'tsoa'
import { getAuthorizedRoutes } from '../utils'
export interface AuthorizedRoutesResponse {
URIs: string[]
}
export interface InfoResponse {
mode: string
@@ -36,4 +40,19 @@ export class InfoController {
}
return response
}
/**
* @summary Get authorized routes.
*
*/
@Example<AuthorizedRoutesResponse>({
URIs: ['/AppStream', '/SASjsApi/stp/execute']
})
@Get('/authorizedRoutes')
public authorizedRoutes(): AuthorizedRoutesResponse {
const response = {
URIs: getAuthorizedRoutes()
}
return response
}
}