summaryrefslogtreecommitdiff
path: root/src/api/endpoints/posts
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/endpoints/posts')
-rw-r--r--src/api/endpoints/posts/create.ts6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/api/endpoints/posts/create.ts b/src/api/endpoints/posts/create.ts
index 26faee4713..535f850a6e 100644
--- a/src/api/endpoints/posts/create.ts
+++ b/src/api/endpoints/posts/create.ts
@@ -36,9 +36,7 @@ module.exports = (params, user, app) => new Promise(async (res, rej) => {
// Fetch files
// forEach だと途中でエラーなどがあっても return できないので
// 敢えて for を使っています。
- for (let i = 0; i < mediaIds.length; i++) {
- const mediaId = mediaIds[i];
-
+ for (const mediaId of mediaIds) {
// Fetch file
// SELECT _id
const entity = await DriveFile.findOne({
@@ -188,7 +186,7 @@ module.exports = (params, user, app) => new Promise(async (res, rej) => {
}
});
- let mentions = [];
+ const mentions = [];
function addMention(mentionee, type) {
// Reject if already added