jwt gen & rename fixes
This commit is contained in:
parent
313785b4ac
commit
a165231c47
13 changed files with 101 additions and 41 deletions
|
@ -11,14 +11,14 @@ export default abstract class WebapiPermissionService {
|
|||
static async getByApi(webapiId: number): Promise<Array<webapiPermission>> {
|
||||
return await dataSource
|
||||
.getRepository(webapiPermission)
|
||||
.createQueryBuilder("api_permission")
|
||||
.where("api_permission.apiId = :apiId", { apiId: webapiId })
|
||||
.createQueryBuilder("webapi_permission")
|
||||
.where("webapi_permission.webapiId = :webapiId", { webapiId: webapiId })
|
||||
.getMany()
|
||||
.then((res) => {
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
throw new InternalException("api permissions not found by api", err);
|
||||
throw new InternalException("webapi permissions not found by api", err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ export default abstract class WebapiService {
|
|||
return await dataSource
|
||||
.getRepository(webapi)
|
||||
.createQueryBuilder("webapi")
|
||||
.select("token")
|
||||
.select("webapi.token")
|
||||
.where("webapi.id = :id", { id: id })
|
||||
.getOneOrFail()
|
||||
.then((res) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue