mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-01 08:01:55 +01:00
ap/showが返ってこないことがあるのを修正
This commit is contained in:
parent
361ab00c61
commit
15395686aa
1 changed files with 5 additions and 5 deletions
|
@ -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);
|
const [ps, psErr] = getParams(meta, params);
|
||||||
if (psErr) return rej(psErr);
|
if (psErr) throw psErr;
|
||||||
|
|
||||||
const object = await fetchAny(ps.uri);
|
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を解決する
|
* URIからUserかNoteを解決する
|
||||||
|
|
Loading…
Reference in a new issue