mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-07 01:04:03 +09:00
wip
This commit is contained in:
@ -6,11 +6,9 @@ import limitter from './limitter';
|
||||
import { IUser } from '../../models/user';
|
||||
import { IApp } from '../../models/app';
|
||||
|
||||
export default (endpoint: string | Endpoint, user: IUser, app: IApp, data: any, req?: http.IncomingMessage) => new Promise(async (ok, rej) => {
|
||||
export default (endpoint: string | Endpoint, user: IUser, app: IApp, data: any, req?: http.IncomingMessage) => new Promise<any>(async (ok, rej) => {
|
||||
const isSecure = user != null && app == null;
|
||||
|
||||
//console.log(endpoint, user, app, data);
|
||||
|
||||
const ep = typeof endpoint == 'string' ? endpoints.find(e => e.name == endpoint) : endpoint;
|
||||
|
||||
if (ep.secure && !isSecure) {
|
||||
|
Reference in New Issue
Block a user