1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-04 01:38:59 +09:00

Merge pull request #2851 from mei23/mei-1008-fix-apshow2

ap/showが返ってこないことがあるのを修正
This commit is contained in:
syuilo 2018-10-08 17:33:46 +09:00 committed by GitHub
commit 6affb4fe97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,15 +24,15 @@ export const meta = {
},
};
export default (params: any) => new Promise(async (res, rej) => {
export default async (params: any) => {
const [ps, psErr] = getParams(meta, params);
if (psErr) return rej(psErr);
if (psErr) throw psErr;
const object = await fetchAny(ps.uri);
if (object !== null) return res(object);
if (object !== null) return object;
return rej('object not found');
});
throw new Error('object not found');
};
/***
* URIからUserかNoteを解決する