diff --git a/src/api/routes/users/@me/mentions.ts b/src/api/routes/users/@me/mentions.ts
index d3c05b44..87602b3c 100644
--- a/src/api/routes/users/@me/mentions.ts
+++ b/src/api/routes/users/@me/mentions.ts
@@ -137,20 +137,18 @@ router.get(
},
take: limit,
})
- ).map((m) => {
- return {
- ...m.toJSON(),
- attachments: m.attachments?.map((attachment: Attachment) =>
- Attachment.prototype.signUrls.call(
- attachment,
- new NewUrlUserSignatureData({
- ip: req.ip,
- userAgent: req.headers["user-agent"] as string,
- }),
- ),
+ ).map((m) => ({
+ ...m.toJSON(),
+ attachments: m.attachments?.map((attachment: Attachment) =>
+ Attachment.prototype.signUrls.call(
+ attachment,
+ new NewUrlUserSignatureData({
+ ip: req.ip,
+ userAgent: req.headers["user-agent"] as string,
+ }),
),
- };
- });
+ ),
+ }));
console.log(`[Inbox/mentions] User ${user.id} fetched full message data for ${finalMessages.length} messages in ${sw.elapsed().totalMilliseconds}ms`);
diff --git a/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts b/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts
index f99f7b3d..778fb9d8 100644
--- a/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts
+++ b/src/api/routes/users/@me/mfa/webauthn/credentials/index.ts
@@ -25,13 +25,8 @@ import { HTTPError } from "lambert-server";
import { CreateWebAuthnCredentialSchema, GenerateWebAuthnCredentialsSchema, WebAuthnPostSchema } from "@spacebar/schemas";
const router = Router({ mergeParams: true });
-const isGenerateSchema = (body: WebAuthnPostSchema): body is GenerateWebAuthnCredentialsSchema => {
- return "password" in body;
-};
-
-const isCreateSchema = (body: WebAuthnPostSchema): body is CreateWebAuthnCredentialSchema => {
- return "credential" in body;
-};
+const isGenerateSchema = (body: WebAuthnPostSchema): body is GenerateWebAuthnCredentialsSchema => "password" in body;
+const isCreateSchema = (body: WebAuthnPostSchema): body is CreateWebAuthnCredentialSchema => "credential" in body;
function toArrayBuffer(buf: Buffer) {
const ab = new ArrayBuffer(buf.length);
diff --git a/src/api/routes/users/@me/relationships.ts b/src/api/routes/users/@me/relationships.ts
index e049d152..5da62ce8 100644
--- a/src/api/routes/users/@me/relationships.ts
+++ b/src/api/routes/users/@me/relationships.ts
@@ -64,8 +64,8 @@ router.put(
},
},
}),
- async (req: Request, res: Response) => {
- return await updateRelationship(
+ async (req: Request, res: Response) =>
+ await updateRelationship(
req,
res,
await User.findOneOrFail({
@@ -74,8 +74,7 @@ router.put(
select: userProjection,
}),
req.body.type ?? RelationshipType.friends,
- );
- },
+ ),
);
router.patch(
@@ -130,8 +129,8 @@ router.post(
},
},
}),
- async (req: Request, res: Response) => {
- return await updateRelationship(
+ async (req: Request, res: Response) =>
+ await updateRelationship(
req,
res,
await User.findOneOrFail({
@@ -143,8 +142,7 @@ router.post(
},
}),
req.body.type,
- );
- },
+ ),
);
router.delete(
|