mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-11 08:32:47 +01:00
Merge branch 'master' of aya.github:syuilo/misskey
This commit is contained in:
commit
a0a116b7bf
1 changed files with 2 additions and 1 deletions
|
@ -6,7 +6,8 @@ import { IApp } from '../../models/app';
|
||||||
export default (endpoint: string | Endpoint, user: IUser, app: IApp, data: any, file?: any) => new Promise<any>(async (ok, rej) => {
|
export default (endpoint: string | Endpoint, user: IUser, app: IApp, data: any, file?: any) => new Promise<any>(async (ok, rej) => {
|
||||||
const isSecure = user != null && app == null;
|
const isSecure = user != null && app == null;
|
||||||
|
|
||||||
const ep = typeof endpoint == 'string' ? endpoints.find(e => e.name == endpoint) : endpoint;
|
const epName = typeof endpoint === 'string' ? endpoint : endpoint.name;
|
||||||
|
const ep = endpoints.find(e => e.name === epName);
|
||||||
|
|
||||||
if (ep.name.includes('.')) {
|
if (ep.name.includes('.')) {
|
||||||
return rej('INVALID_ENDPOINT');
|
return rej('INVALID_ENDPOINT');
|
||||||
|
|
Loading…
Reference in a new issue