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

fix: update schema of Permission

This commit is contained in:
2022-08-01 21:33:10 +05:00
parent b7dff341f0
commit 5d5a9d3788
14 changed files with 488 additions and 366 deletions

View File

@@ -1,7 +1,7 @@
import { Route, Tags, Example, Get } from 'tsoa'
import { getAuthorizedRoutes } from '../utils'
export interface AuthorizedRoutesResponse {
URIs: string[]
paths: string[]
}
export interface InfoResponse {
@@ -42,16 +42,16 @@ export class InfoController {
}
/**
* @summary Get authorized routes.
* @summary Get the list of available routes to which permissions can be applied. Used to populate the dialog in the URI Permissions feature.
*
*/
@Example<AuthorizedRoutesResponse>({
URIs: ['/AppStream', '/SASjsApi/stp/execute']
paths: ['/AppStream', '/SASjsApi/stp/execute']
})
@Get('/authorizedRoutes')
public authorizedRoutes(): AuthorizedRoutesResponse {
const response = {
URIs: getAuthorizedRoutes()
paths: getAuthorizedRoutes()
}
return response
}