From dbaf39237ae3a41b6b1ac6a6cd3486129599b815 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Mon, 26 Sep 2022 22:29:30 +1000 Subject: Prettier --- src/api/util/utility/String.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/api/util/utility/String.ts') diff --git a/src/api/util/utility/String.ts b/src/api/util/utility/String.ts index 982b7e11..0913013e 100644 --- a/src/api/util/utility/String.ts +++ b/src/api/util/utility/String.ts @@ -2,13 +2,21 @@ import { Request } from "express"; import { ntob } from "./Base64"; import { FieldErrors } from "@fosscord/util"; -export function checkLength(str: string, min: number, max: number, key: string, req: Request) { +export function checkLength( + str: string, + min: number, + max: number, + key: string, + req: Request, +) { if (str.length < min || str.length > max) { throw FieldErrors({ [key]: { code: "BASE_TYPE_BAD_LENGTH", - message: req.t("common:field.BASE_TYPE_BAD_LENGTH", { length: `${min} - ${max}` }) - } + message: req.t("common:field.BASE_TYPE_BAD_LENGTH", { + length: `${min} - ${max}`, + }), + }, }); } } -- cgit 1.5.1