mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 16:53:08 +02:00
Refactor: Better variable name
This commit is contained in:
parent
9a90d8a7b4
commit
0cb6fbea8c
1 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ app.get('/@:user/:post', async (req, res, next) => {
|
||||||
return res.sendStatus(404);
|
return res.sendStatus(404);
|
||||||
}
|
}
|
||||||
|
|
||||||
const asyncFiles = DriveFile.find({ _id: { $in: post.mediaIds } });
|
const promisedFiles = DriveFile.find({ _id: { $in: post.mediaIds } });
|
||||||
let inReplyTo;
|
let inReplyTo;
|
||||||
|
|
||||||
if (post.replyId) {
|
if (post.replyId) {
|
||||||
|
@ -69,7 +69,7 @@ app.get('/@:user/:post', async (req, res, next) => {
|
||||||
to: 'https://www.w3.org/ns/activitystreams#Public',
|
to: 'https://www.w3.org/ns/activitystreams#Public',
|
||||||
cc: `${attributedTo}/followers`,
|
cc: `${attributedTo}/followers`,
|
||||||
inReplyTo,
|
inReplyTo,
|
||||||
attachment: (await asyncFiles).map(({ _id, contentType }) => ({
|
attachment: (await promisedFiles).map(({ _id, contentType }) => ({
|
||||||
type: 'Document',
|
type: 'Document',
|
||||||
mediaType: contentType,
|
mediaType: contentType,
|
||||||
url: `${config.drive_url}/${_id}`
|
url: `${config.drive_url}/${_id}`
|
||||||
|
|
Loading…
Reference in a new issue