From 21e5f637d62e7c192375a60e97c1c9a839ffc675 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 31 Oct 2018 11:24:36 +0900 Subject: [PATCH] [API] Include detailed user information of blocking API responses --- src/server/api/endpoints/blocking/create.ts | 4 +++- src/server/api/endpoints/blocking/delete.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/server/api/endpoints/blocking/create.ts b/src/server/api/endpoints/blocking/create.ts index c23573119..c3a4d24ae 100644 --- a/src/server/api/endpoints/blocking/create.ts +++ b/src/server/api/endpoints/blocking/create.ts @@ -71,5 +71,7 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) = await create(blocker, blockee); // Send response - res(await pack(blockee._id, user)); + res(await pack(blockee._id, user, { + detail: true + })); }); diff --git a/src/server/api/endpoints/blocking/delete.ts b/src/server/api/endpoints/blocking/delete.ts index dd0cf6b51..e712d54d3 100644 --- a/src/server/api/endpoints/blocking/delete.ts +++ b/src/server/api/endpoints/blocking/delete.ts @@ -71,5 +71,7 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) = await deleteBlocking(blocker, blockee); // Send response - res(await pack(blockee._id, user)); + res(await pack(blockee._id, user, { + detail: true + })); });