Format
This commit is contained in:
parent
13acf570e7
commit
0d86eef3d7
3 changed files with 5 additions and 5 deletions
|
@ -41,7 +41,7 @@ async function fetchAny(uri: string) {
|
|||
// URIがこのサーバーを指しているなら、ローカルユーザーIDとしてDBからフェッチ
|
||||
if (uri.startsWith(config.url + '/')) {
|
||||
const id = new mongo.ObjectID(uri.split('/').pop());
|
||||
const [ user, note ] = await Promise.all([
|
||||
const [user, note] = await Promise.all([
|
||||
User.findOne({ _id: id }),
|
||||
Note.findOne({ _id: id })
|
||||
]);
|
||||
|
@ -52,7 +52,7 @@ async function fetchAny(uri: string) {
|
|||
|
||||
// URI(AP Object id)としてDB検索
|
||||
{
|
||||
const [ user, note ] = await Promise.all([
|
||||
const [user, note] = await Promise.all([
|
||||
User.findOne({ uri: uri }),
|
||||
Note.findOne({ uri: uri })
|
||||
]);
|
||||
|
@ -68,7 +68,7 @@ async function fetchAny(uri: string) {
|
|||
// /@user のような正規id以外で取得できるURIが指定されていた場合、ここで初めて正規URIが確定する
|
||||
// これはDBに存在する可能性があるため再度DB検索
|
||||
if (uri !== object.id) {
|
||||
const [ user, note ] = await Promise.all([
|
||||
const [user, note] = await Promise.all([
|
||||
User.findOne({ uri: object.id }),
|
||||
Note.findOne({ uri: object.id })
|
||||
]);
|
||||
|
|
|
@ -13,7 +13,7 @@ import perUserFollowingChart from '../../chart/per-user-following';
|
|||
|
||||
export default async function(follower: IUser, followee: IUser, requestId?: string) {
|
||||
// check blocking
|
||||
const [ blocking, blocked ] = await Promise.all([
|
||||
const [blocking, blocked] = await Promise.all([
|
||||
Blocking.findOne({
|
||||
blockerId: follower._id,
|
||||
blockeeId: followee._id,
|
||||
|
|
|
@ -9,7 +9,7 @@ import Blocking from '../../../models/blocking';
|
|||
|
||||
export default async function(follower: IUser, followee: IUser, requestId?: string) {
|
||||
// check blocking
|
||||
const [ blocking, blocked ] = await Promise.all([
|
||||
const [blocking, blocked] = await Promise.all([
|
||||
Blocking.findOne({
|
||||
blockerId: follower._id,
|
||||
blockeeId: followee._id,
|
||||
|
|
Loading…
Reference in a new issue