diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2020-03-28 11:24:37 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2020-03-28 11:24:37 +0900 |
| commit | 6be127e18bdbea6031698baeb8632f917a8346eb (patch) | |
| tree | 4b7ceb082d76b0628df6496bc802172106721ce9 /src/server/api/call.ts | |
| parent | wip (diff) | |
| download | sharkey-6be127e18bdbea6031698baeb8632f917a8346eb.tar.gz sharkey-6be127e18bdbea6031698baeb8632f917a8346eb.tar.bz2 sharkey-6be127e18bdbea6031698baeb8632f917a8346eb.zip | |
Implement MiAuth
Diffstat (limited to 'src/server/api/call.ts')
| -rw-r--r-- | src/server/api/call.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/api/call.ts b/src/server/api/call.ts index 37bcf7ce16..c75006ef31 100644 --- a/src/server/api/call.ts +++ b/src/server/api/call.ts @@ -4,7 +4,10 @@ import { User } from '../../models/entities/user'; import endpoints from './endpoints'; import { ApiError } from './error'; import { apiLogger } from './logger'; -import { App } from '../../models/entities/app'; + +type App = { + permission: string[]; +}; const accessDenied = { message: 'Access denied.', @@ -73,7 +76,7 @@ export default async (endpoint: string, user: User | null | undefined, app: App // API invoking const before = performance.now(); - return await ep.exec(data, user, app, file).catch((e: Error) => { + return await ep.exec(data, user, isSecure, file).catch((e: Error) => { if (e instanceof ApiError) { throw e; } else { |